Private
Public Access
1
0

Merge branch 'release/v16.4.7'

This commit is contained in:
Sander Roosendaal
2021-06-07 09:43:06 +02:00
5 changed files with 21 additions and 5 deletions

View File

@@ -3045,7 +3045,7 @@ def df_from_summary(data):
try:
splits = data['workout']['splits']
except KeyError: # pragma: no cover
except (KeyError, TypeError): # pragma: no cover
splits = [0]
time = starttimeunix
elapsed_distance = 0
@@ -3053,11 +3053,11 @@ def df_from_summary(data):
distances = [0]
try:
spms = [splits[0]['stroke_rate']]
except KeyError: # pragma: no cover
except (KeyError, TypeError): # pragma: no cover
spms = [0]
try:
hrs = [splits[0]['heart_rate']['average']]
except KeyError: # pragma: no cover
except (KeyError, TypeError): # pragma: no cover
hrs = [0]
for split in splits:
@@ -3068,7 +3068,7 @@ def df_from_summary(data):
spms.append(split['stroke_rate'])
try:
hrs.append(split['heart_rate']['average'])
except KeyError: # pragma: no cover
except (KeyError, TypeError): # pragma: no cover
hrs.append(0)
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
df = df_from_summary(data)
else:
dologging('debuglog.log',json.dumps(s.json()))
#dologging('debuglog.log',json.dumps(s.json()))
strokedata = pd.DataFrame.from_dict(s.json()['data'])

View File

@@ -108,6 +108,17 @@
See which of your workouts are markers of your fitness, and how your scores
evolve over time.
</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 class="rounder">
<h2>Alerts</h2>

View File

@@ -57,6 +57,11 @@
<i class="fas fa-star fa-fw"></i>&nbsp;Ranking Pieces
</a>
</li>
<li id="fitness-zones">
<a href="/rowers/trainingzones/">
<i class="fas fa-percent fa-fw"></i>&nbsp;Training Zones
</a>
</li>
</ul>
</li>
<li class="has-children" id="stats">

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB