adding training zones links to analysis page and menu
This commit is contained in:
@@ -3045,7 +3045,7 @@ def df_from_summary(data):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
splits = data['workout']['splits']
|
splits = data['workout']['splits']
|
||||||
except KeyError: # pragma: no cover
|
except (KeyError, TypeError): # pragma: no cover
|
||||||
splits = [0]
|
splits = [0]
|
||||||
time = starttimeunix
|
time = starttimeunix
|
||||||
elapsed_distance = 0
|
elapsed_distance = 0
|
||||||
@@ -3053,11 +3053,11 @@ def df_from_summary(data):
|
|||||||
distances = [0]
|
distances = [0]
|
||||||
try:
|
try:
|
||||||
spms = [splits[0]['stroke_rate']]
|
spms = [splits[0]['stroke_rate']]
|
||||||
except KeyError: # pragma: no cover
|
except (KeyError, TypeError): # pragma: no cover
|
||||||
spms = [0]
|
spms = [0]
|
||||||
try:
|
try:
|
||||||
hrs = [splits[0]['heart_rate']['average']]
|
hrs = [splits[0]['heart_rate']['average']]
|
||||||
except KeyError: # pragma: no cover
|
except (KeyError, TypeError): # pragma: no cover
|
||||||
hrs = [0]
|
hrs = [0]
|
||||||
|
|
||||||
for split in splits:
|
for split in splits:
|
||||||
@@ -3068,7 +3068,7 @@ def df_from_summary(data):
|
|||||||
spms.append(split['stroke_rate'])
|
spms.append(split['stroke_rate'])
|
||||||
try:
|
try:
|
||||||
hrs.append(split['heart_rate']['average'])
|
hrs.append(split['heart_rate']['average'])
|
||||||
except KeyError: # pragma: no cover
|
except (KeyError, TypeError): # pragma: no cover
|
||||||
hrs.append(0)
|
hrs.append(0)
|
||||||
|
|
||||||
df = pd.DataFrame({
|
df = pd.DataFrame({
|
||||||
@@ -3161,7 +3161,7 @@ def handle_c2_async_workout(alldata,userid,c2token,c2id,delaysec,defaulttimezone
|
|||||||
if not has_strokedata: # pragma: no cover
|
if not has_strokedata: # pragma: no cover
|
||||||
df = df_from_summary(data)
|
df = df_from_summary(data)
|
||||||
else:
|
else:
|
||||||
dologging('debuglog.log',json.dumps(s.json()))
|
#dologging('debuglog.log',json.dumps(s.json()))
|
||||||
|
|
||||||
strokedata = pd.DataFrame.from_dict(s.json()['data'])
|
strokedata = pd.DataFrame.from_dict(s.json()['data'])
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,17 @@
|
|||||||
See which of your workouts are markers of your fitness, and how your scores
|
See which of your workouts are markers of your fitness, and how your scores
|
||||||
evolve over time.
|
evolve over time.
|
||||||
</p>
|
</p>
|
||||||
|
</li>
|
||||||
|
<li class="rounder">
|
||||||
|
<h2>Training Zones</h2>
|
||||||
|
<a href="/rowers/trainingzones/">
|
||||||
|
<div class="vignet">
|
||||||
|
<img src="/static/img/zones2.png" alt="Zones">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
See in what training zone you have been training in the past weeks and months.
|
||||||
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="rounder">
|
<li class="rounder">
|
||||||
<h2>Alerts</h2>
|
<h2>Alerts</h2>
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
<i class="fas fa-star fa-fw"></i> Ranking Pieces
|
<i class="fas fa-star fa-fw"></i> Ranking Pieces
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="fitness-zones">
|
||||||
|
<a href="/rowers/trainingzones/">
|
||||||
|
<i class="fas fa-percent fa-fw"></i> Training Zones
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="has-children" id="stats">
|
<li class="has-children" id="stats">
|
||||||
|
|||||||
BIN
static/img/zones.png
Normal file
BIN
static/img/zones.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
static/img/zones2.png
Normal file
BIN
static/img/zones2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user