Merge branch 'feature/dropdowns' into develop
This commit is contained in:
@@ -27,6 +27,15 @@ nometrics = [
|
|||||||
'totalangle',
|
'totalangle',
|
||||||
'hr_bottom',
|
'hr_bottom',
|
||||||
'x_right',
|
'x_right',
|
||||||
|
'Position',
|
||||||
|
'Extensions',
|
||||||
|
'GPS Speed',
|
||||||
|
'Split (IMP)',
|
||||||
|
'Speed (IMP)',
|
||||||
|
'driveenergy',
|
||||||
|
'Distance/Stroke (IMP)',
|
||||||
|
'Distance/Stroke (GPS)',
|
||||||
|
'Distance (IMP)',
|
||||||
'equivergpower',
|
'equivergpower',
|
||||||
'cum_dist.1'
|
'cum_dist.1'
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -52,10 +52,11 @@
|
|||||||
<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_9 alpha">
|
||||||
<div class="grid_2 alpha dropdown">
|
<div class="grid_3 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">
|
||||||
|
<div style="float: left; width:67%;">
|
||||||
{% for key, value in axchoicesbasic.items %}
|
{% for key, value in axchoicesbasic.items %}
|
||||||
{% if key != 'None' %}
|
{% if key != 'None' %}
|
||||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -70,6 +71,8 @@
|
|||||||
<a class="button rosy small" href="/rowers/promembership">{{ value }}</a>
|
<a class="button rosy small" href="/rowers/promembership">{{ value }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div style="float: right; width: 33%;">
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
{% for key, value in extrametrics.items %}
|
{% for key, value in extrametrics.items %}
|
||||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ key }}/{{ yparam1 }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -79,12 +82,14 @@
|
|||||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="left-y" class="grid_2 dropdown">
|
<div id="left-y" class="grid_3 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">
|
||||||
|
<div style="float: left; width:67%;">
|
||||||
{% for key, value in axchoicesbasic.items %}
|
{% for key, value in axchoicesbasic.items %}
|
||||||
{% if key not in noylist and key != 'None' %}
|
{% if key not in noylist and key != 'None' %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -103,6 +108,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div style="float: right; width:33%;">
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
{% for key, value in extrametrics.items %}
|
{% for key, value in extrametrics.items %}
|
||||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ key }}/{{ yparam2 }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -112,12 +119,14 @@
|
|||||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="right-y" class="grid_2 dropdown omega">
|
<div id="right-y" class="grid_3 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">
|
||||||
|
<div style="float: left; width:67%;">
|
||||||
{% for key, value in axchoicesbasic.items %}
|
{% for key, value in axchoicesbasic.items %}
|
||||||
{% if key not in noylist %}
|
{% if key not in noylist %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -136,6 +145,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div style="float: right; width:33%;">
|
||||||
{% if promember %}
|
{% if promember %}
|
||||||
{% for key, value in extrametrics.items %}
|
{% for key, value in extrametrics.items %}
|
||||||
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
<a class="button orange small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ key }}/{{ plottype }}">{{ value }}</a>
|
||||||
@@ -145,13 +156,13 @@
|
|||||||
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
<a class="button rosy small" href="/rowers/promembership">{{ value }} (Pro)</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="y-axis" class="grid_6 omega">
|
<div id="y-axis" class="grid_3 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 %}
|
||||||
@@ -165,11 +176,12 @@
|
|||||||
</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_1 omega">
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/line">Line Plot</a>
|
{% if plottype == 'scatter' %}
|
||||||
</div>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/{{ yparam2 }}/line">Line</a>
|
||||||
<div class="grid_2 omega">
|
{% else %}
|
||||||
<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</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -7336,9 +7336,11 @@ def instroke_view(request,id=0):
|
|||||||
|
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
|
from metrics import nometrics
|
||||||
rowdata = rrdata(csvfile=row.csvfilename)
|
rowdata = rrdata(csvfile=row.csvfilename)
|
||||||
try:
|
try:
|
||||||
instrokemetrics = rowdata.get_instroke_columns()
|
instrokemetrics = rowdata.get_instroke_columns()
|
||||||
|
instrokemetrics = [m for m in instrokemetrics if not m in nometrics]
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
instrokemetrics = []
|
instrokemetrics = []
|
||||||
|
|
||||||
@@ -7427,6 +7429,7 @@ def instroke_chart(request,id=0,metric=''):
|
|||||||
rowdata = rrdata(csvfile=w.csvfilename)
|
rowdata = rrdata(csvfile=w.csvfilename)
|
||||||
instrokemetrics = rowdata.get_instroke_columns()
|
instrokemetrics = rowdata.get_instroke_columns()
|
||||||
|
|
||||||
|
|
||||||
if metric in instrokemetrics:
|
if metric in instrokemetrics:
|
||||||
f1 = w.csvfilename[6:-4]
|
f1 = w.csvfilename[6:-4]
|
||||||
timestr = strftime("%Y%m%d-%H%M%S")
|
timestr = strftime("%Y%m%d-%H%M%S")
|
||||||
@@ -8456,6 +8459,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
if d['mode'] == 'water':
|
if d['mode'] == 'water':
|
||||||
axchoicespro.pop(name)
|
axchoicespro.pop(name)
|
||||||
|
|
||||||
|
from rowers.metrics import nometrics
|
||||||
|
|
||||||
rowdata = rdata(row.csvfilename)
|
rowdata = rdata(row.csvfilename)
|
||||||
try:
|
try:
|
||||||
@@ -8464,6 +8468,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
additionalmetrics = rowdata.get_additional_metrics()
|
additionalmetrics = rowdata.get_additional_metrics()
|
||||||
|
additionalmetrics = [m for m in additionalmetrics if not m in nometrics]
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
additionalmetrics = []
|
additionalmetrics = []
|
||||||
|
|
||||||
@@ -8474,7 +8479,6 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
yparam1 = yparam1.replace('/','_slsh_')
|
yparam1 = yparam1.replace('/','_slsh_')
|
||||||
yparam2 = yparam2.replace('/','_slsh_')
|
yparam2 = yparam2.replace('/','_slsh_')
|
||||||
|
|
||||||
from rowers.metrics import nometrics
|
|
||||||
|
|
||||||
for metric in nometrics:
|
for metric in nometrics:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user