toggle rest stroke buttons
This commit is contained in:
@@ -125,7 +125,7 @@ def tailwind(bearing,vwind,winddir):
|
|||||||
from rowers.dataprep import nicepaceformat,niceformat
|
from rowers.dataprep import nicepaceformat,niceformat
|
||||||
from rowers.dataprep import timedeltaconv
|
from rowers.dataprep import timedeltaconv
|
||||||
|
|
||||||
def interactive_forcecurve(theworkouts):
|
def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
|
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
|
||||||
|
|
||||||
ids = [int(w.id) for w in theworkouts]
|
ids = [int(w.id) for w in theworkouts]
|
||||||
@@ -133,10 +133,21 @@ def interactive_forcecurve(theworkouts):
|
|||||||
boattype = theworkouts[0].boattype
|
boattype = theworkouts[0].boattype
|
||||||
|
|
||||||
columns = ['catch','slip','wash','finish','averageforce',
|
columns = ['catch','slip','wash','finish','averageforce',
|
||||||
'peakforceangle','peakforce','spm','distance']
|
'peakforceangle','peakforce','spm','distance',
|
||||||
|
'workoutstate']
|
||||||
|
|
||||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=ids)
|
rowdata = dataprep.getsmallrowdata_db(columns,ids=ids)
|
||||||
|
|
||||||
|
workoutstateswork = [1,4,5,8,9,6,7]
|
||||||
|
workoutstatesrest = [3]
|
||||||
|
workoutstatetransition = [0,2,10,11,12,13]
|
||||||
|
|
||||||
|
if workstrokesonly:
|
||||||
|
try:
|
||||||
|
rowdata = rowdata[~rowdata['workoutstate'].isin(workoutstatesrest)]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
catchav = rowdata['catch'].mean()
|
catchav = rowdata['catch'].mean()
|
||||||
finishav = rowdata['finish'].mean()
|
finishav = rowdata['finish'].mean()
|
||||||
washav = rowdata['wash'].mean()
|
washav = rowdata['wash'].mean()
|
||||||
|
|||||||
+120
-119
@@ -8,37 +8,37 @@
|
|||||||
{% localtime on %}
|
{% localtime on %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{{ js_res | safe }}
|
{{ js_res | safe }}
|
||||||
{{ css_res| safe }}
|
{{ css_res| safe }}
|
||||||
|
|
||||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/bokeh-widgets-0.12.3.min.js"></script>
|
<script type="text/javascript" src="/static/js/bokeh-widgets-0.12.3.min.js"></script>
|
||||||
<script async="true" type="text/javascript">
|
<script async="true" type="text/javascript">
|
||||||
Bokeh.set_log_level("info");
|
Bokeh.set_log_level("info");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{ the_script |safe }}
|
{{ the_script |safe }}
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||||
html, body {height: 100%; margin:5px;}
|
html, body {height: 100%; margin:5px;}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="navigation" class="grid_12 alpha">
|
<div id="navigation" class="grid_12 alpha">
|
||||||
{% if user.is_authenticated and mayedit %}
|
{% if user.is_authenticated and mayedit %}
|
||||||
<div class="grid_2 alpha">
|
<div class="grid_2 alpha">
|
||||||
<p>
|
<p>
|
||||||
<a class="button gray small" href="/rowers/workout/{{ id }}/edit">Edit Workout</a>
|
<a class="button gray small" href="/rowers/workout/{{ id }}/edit">Edit Workout</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_2 suffix_8 omega">
|
<div class="grid_2 suffix_8 omega">
|
||||||
<p>
|
<p>
|
||||||
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
|
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -47,119 +47,120 @@
|
|||||||
<div id="plotbuttons" class="grid_12 alpha">
|
<div id="plotbuttons" class="grid_12 alpha">
|
||||||
|
|
||||||
|
|
||||||
<div id="x-axis" class="grid_6 alpha">
|
<div id="x-axis" class="grid_6 alpha">
|
||||||
<div class="grid_2 alpha dropdown">
|
<div class="grid_2 alpha dropdown">
|
||||||
<button class="grid_2 alpha button blue small dropbtn">X-axis</button>
|
<button class="grid_2 alpha button blue small dropbtn">X-axis</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/time/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">Time</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/time/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">Time</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/distance/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">Distance</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/distance/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">Distance</a>
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/power/{{ yparam1 }}/{{ yparam2 }}/scatter">Power</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/power/{{ yparam1 }}/{{ yparam2 }}/scatter">Power</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/hr/{{ yparam1 }}/{{ yparam2 }}/scatter">HR</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/hr/{{ yparam1 }}/{{ yparam2 }}/scatter">HR</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/spm/{{ yparam1 }}/{{ yparam2 }}/scatter">SPM</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/spm/{{ yparam1 }}/{{ yparam2 }}/scatter">SPM</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/peakforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Peak Force</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/peakforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Peak Force</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/averageforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Average Force</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/averageforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Average Force</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/forceratio/{{ yparam1 }}/{{ yparam2 }}/scatter">Average/Peak force ratio</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/forceratio/{{ yparam1 }}/{{ yparam2 }}/scatter">Average/Peak force ratio</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivelength/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Length</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivelength/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Length</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/driveenergy/{{ yparam1 }}/{{ yparam2 }}/scatter">Work per Stroke</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/driveenergy/{{ yparam1 }}/{{ yparam2 }}/scatter">Work per Stroke</a>
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivespeed/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Speed</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivespeed/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Speed</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="button rosy small" href="/rowers/promembership">Power (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Power (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">HR (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">HR (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">SPM (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">SPM (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_2 dropdown">
|
<div class="grid_2 dropdown">
|
||||||
<button class="grid_2 alpha button blue small dropbtn">Left</button>
|
<button class="grid_2 alpha button blue small dropbtn">Left</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/pace/{{ yparam2 }}/{{ plottype }}">Pace</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/pace/{{ yparam2 }}/{{ plottype }}">Pace</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/hr/{{ yparam2 }}/{{ plottype }}">HR</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/hr/{{ yparam2 }}/{{ plottype }}">HR</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/spm/{{ yparam2 }}/{{ plottype }}">SPM</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/spm/{{ yparam2 }}/{{ plottype }}">SPM</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/power/{{ yparam2 }}/{{ plottype }}">Power</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/power/{{ yparam2 }}/{{ plottype }}">Power</a>
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/peakforce/{{ yparam2 }}/{{ plottype }}">Peak Force</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/peakforce/{{ yparam2 }}/{{ plottype }}">Peak Force</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/averageforce/{{ yparam2 }}/{{ plottype }}">Average Force</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/averageforce/{{ yparam2 }}/{{ plottype }}">Average Force</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/forceratio/{{ yparam2 }}/{{ plottype }}">Average/Peak Force Ratio</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/forceratio/{{ yparam2 }}/{{ plottype }}">Average/Peak Force Ratio</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivelength/{{ yparam2 }}/{{ plottype }}">Drive Length</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivelength/{{ yparam2 }}/{{ plottype }}">Drive Length</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/driveenergy/{{ yparam2 }}/{{ plottype }}">Work per Stroke</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/driveenergy/{{ yparam2 }}/{{ plottype }}">Work per Stroke</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivespeed/{{ yparam2 }}/{{ plottype }}">Drive Speed</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivespeed/{{ yparam2 }}/{{ plottype }}">Drive Speed</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_2 dropdown omega">
|
<div class="grid_2 dropdown omega">
|
||||||
<button class="grid_2 alpha button blue small dropbtn">Right</button>
|
<button class="grid_2 alpha button blue small dropbtn">Right</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/hr/{{ plottype }}">HR</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/hr/{{ plottype }}">HR</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/spm/{{ plottype }}">SPM</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/spm/{{ plottype }}">SPM</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/power/{{ plottype }}">Power</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/power/{{ plottype }}">Power</a>
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/peakforce/{{ plottype }}">Peak Force</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/peakforce/{{ plottype }}">Peak Force</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/averageforce/{{ plottype }}">Average Force</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/averageforce/{{ plottype }}">Average Force</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/forceratio/{{ plottype }}">Average/Peak Force Ratio</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/forceratio/{{ plottype }}">Average/Peak Force Ratio</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivelength/{{ plottype }}">Drive Length</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivelength/{{ plottype }}">Drive Length</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/driveenergy/{{ plottype }}">Work per Stroke</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/driveenergy/{{ plottype }}">Work per Stroke</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivespeed/{{ plottype }}">Drive Speed</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivespeed/{{ plottype }}">Drive Speed</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/None/{{ plottype }}">None</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/None/{{ plottype }}">None</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="y-axis" class="grid_6 omega">
|
<div id="y-axis" class="grid_6 omega">
|
||||||
<div class="grid_2 alpha tooltip">
|
<div class="grid_2 alpha tooltip">
|
||||||
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% if workstrokesonly %}
|
{% if workstrokesonly %}
|
||||||
<input type="hidden" name="workstrokesonly" value="True">
|
<input type="hidden" name="workstrokesonly" value="True">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Remove Rest Strokes" type="Submit">
|
||||||
{% else %}
|
{% else %}
|
||||||
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Include Rest Strokes" type="Submit">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input class="grid_2 alpha button blue small" value="Toggle Work Strokes" type="Submit">
|
</form>
|
||||||
</form>
|
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
||||||
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
</div>
|
||||||
</div>
|
<div class="grid_2">
|
||||||
<div class="grid_2">
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/line">Line Plot</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/line">Line Plot</a>
|
</div>
|
||||||
</div>
|
<div class="grid_2 omega">
|
||||||
<div class="grid_2 omega">
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/scatter">Scatter Plot</a>
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/scatter">Scatter Plot</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="theplot" class="grid_12 alpha">
|
<div id="theplot" class="grid_12 alpha">
|
||||||
|
|
||||||
|
|
||||||
{{ the_div|safe }}
|
{{ the_div|safe }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -174,10 +174,11 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% if workstrokesonly %}
|
{% if workstrokesonly %}
|
||||||
<input type="hidden" name="workstrokesonly" value="True">
|
<input type="hidden" name="workstrokesonly" value="True">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Remove Rest Strokes" type="Submit">
|
||||||
{% else %}
|
{% else %}
|
||||||
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Include Rest Strokes" type="Submit">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input class="grid_2 alpha button blue small" value="Toggle Work Strokes" type="Submit">
|
|
||||||
</form>
|
</form>
|
||||||
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,22 +8,22 @@
|
|||||||
{% localtime on %}
|
{% localtime on %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{{ js_res | safe }}
|
{{ js_res | safe }}
|
||||||
{{ css_res| safe }}
|
{{ css_res| safe }}
|
||||||
|
|
||||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/bokeh-widgets-0.12.3.min.js"></script>
|
<script type="text/javascript" src="/static/js/bokeh-widgets-0.12.3.min.js"></script>
|
||||||
<script async="true" type="text/javascript">
|
<script async="true" type="text/javascript">
|
||||||
Bokeh.set_log_level("info");
|
Bokeh.set_log_level("info");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{ the_script |safe }}
|
{{ the_script |safe }}
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||||
html, body {height: 100%; margin:5px;}
|
html, body {height: 100%; margin:5px;}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="navigation" class="grid_12 alpha">
|
<div id="navigation" class="grid_12 alpha">
|
||||||
{% if user.is_authenticated and mayedit %}
|
{% if user.is_authenticated and mayedit %}
|
||||||
@@ -32,13 +32,28 @@
|
|||||||
<a class="button gray small" href="/rowers/workout/{{ id }}/edit">Edit Workout</a>
|
<a class="button gray small" href="/rowers/workout/{{ id }}/edit">Edit Workout</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_2 suffix_8 omega">
|
<div class="grid_2 suffix_2">
|
||||||
<p>
|
<p>
|
||||||
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
|
<a class="button gray small" href="/rowers/workout/{{ id }}/advanced">Advanced Edit</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="grid_2 suffix_4 omega tooltip">
|
||||||
|
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% if workstrokesonly %}
|
||||||
|
<input type="hidden" name="workstrokesonly" value="True">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Remove Rest Strokes" type="Submit">
|
||||||
|
{% else %}
|
||||||
|
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
||||||
|
<input class="grid_2 alpha button blue small" value="Include Rest Strokes" type="Submit">
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+11
-2
@@ -1463,7 +1463,7 @@ def cum_flex(request,theuser=0,
|
|||||||
})
|
})
|
||||||
|
|
||||||
@user_passes_test(promember,login_url="/",redirect_field_name=None)
|
@user_passes_test(promember,login_url="/",redirect_field_name=None)
|
||||||
def workout_forcecurve_view(request,id=0):
|
def workout_forcecurve_view(request,id=0,workstrokesonly=False):
|
||||||
row = Workout.objects.get(id=id)
|
row = Workout.objects.get(id=id)
|
||||||
promember=0
|
promember=0
|
||||||
mayedit=0
|
mayedit=0
|
||||||
@@ -1478,7 +1478,15 @@ def workout_forcecurve_view(request,id=0):
|
|||||||
if not promember:
|
if not promember:
|
||||||
return HttpResponseRedirect("/rowers/about/")
|
return HttpResponseRedirect("/rowers/about/")
|
||||||
|
|
||||||
script,div,js_resources,css_resources = interactive_forcecurve([row])
|
if request.method == 'POST' and 'workstrokesonly' in request.POST:
|
||||||
|
workstrokesonly = request.POST['workstrokesonly']
|
||||||
|
if workstrokesonly == 'True':
|
||||||
|
workstrokesonly = True
|
||||||
|
else:
|
||||||
|
workstrokesonly = False
|
||||||
|
|
||||||
|
script,div,js_resources,css_resources = interactive_forcecurve([row],
|
||||||
|
workstrokesonly=workstrokesonly)
|
||||||
|
|
||||||
return render(request,
|
return render(request,
|
||||||
'forcecurve_single.html',
|
'forcecurve_single.html',
|
||||||
@@ -1489,6 +1497,7 @@ def workout_forcecurve_view(request,id=0):
|
|||||||
'css_res':css_resources,
|
'css_res':css_resources,
|
||||||
'id':id,
|
'id':id,
|
||||||
'mayedit':mayedit,
|
'mayedit':mayedit,
|
||||||
|
'workstrokesonly': not workstrokesonly,
|
||||||
})
|
})
|
||||||
|
|
||||||
@login_required()
|
@login_required()
|
||||||
|
|||||||
Reference in New Issue
Block a user