Merge branch 'feature/myqueue' into develop
This commit is contained in:
@@ -51,7 +51,7 @@ import arrow
|
|||||||
thetimezone = get_current_timezone()
|
thetimezone = get_current_timezone()
|
||||||
from rowingdata import (
|
from rowingdata import (
|
||||||
TCXParser, RowProParser, ErgDataParser,
|
TCXParser, RowProParser, ErgDataParser,
|
||||||
CoxMateParser,
|
CoxMateParser, HeroParser,
|
||||||
BoatCoachParser, RowPerfectParser, BoatCoachAdvancedParser,
|
BoatCoachParser, RowPerfectParser, BoatCoachAdvancedParser,
|
||||||
ETHParser,
|
ETHParser,
|
||||||
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
||||||
@@ -1828,6 +1828,7 @@ parsers = {
|
|||||||
'humon': HumonParser,
|
'humon': HumonParser,
|
||||||
'eth': ETHParser,
|
'eth': ETHParser,
|
||||||
'nklinklogbook': NKLiNKLogbookParser,
|
'nklinklogbook': NKLiNKLogbookParser,
|
||||||
|
'hero': HeroParser,
|
||||||
}
|
}
|
||||||
|
|
||||||
def parsenonpainsled(fileformat,f2,summary,startdatetime='',empowerfirmware=None,inboard=None,oarlength=None):
|
def parsenonpainsled(fileformat,f2,summary,startdatetime='',empowerfirmware=None,inboard=None,oarlength=None):
|
||||||
|
|||||||
@@ -383,6 +383,9 @@ def async_get_workout(user,stravaid):
|
|||||||
|
|
||||||
# Get a Strava workout summary data and stroke data by ID
|
# Get a Strava workout summary data and stroke data by ID
|
||||||
def get_workout(user,stravaid,do_async=False):
|
def get_workout(user,stravaid,do_async=False):
|
||||||
|
if do_async:
|
||||||
|
res = async_get_workout(user,stravaid)
|
||||||
|
return {},pd.DataFrame()
|
||||||
try:
|
try:
|
||||||
thetoken = strava_open(user)
|
thetoken = strava_open(user)
|
||||||
except NoTokenError: # pragma: no cover
|
except NoTokenError: # pragma: no cover
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
{% for workout in workouts %}
|
{% for workout in workouts %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/">Import</a></td>
|
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/async/">Import</a></td>
|
||||||
<td>{{ workout|lookup:'name' }}</td>
|
<td>{{ workout|lookup:'name' }}</td>
|
||||||
<td>{{ workout|lookup:'starttime' }}</td>
|
<td>{{ workout|lookup:'starttime' }}</td>
|
||||||
<td>{{ workout|lookup:'duration' }} </td>
|
<td>{{ workout|lookup:'duration' }} </td>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<td>{{ workout|lookup:'type' }}</td>
|
<td>{{ workout|lookup:'type' }}</td>
|
||||||
<td>{{ workout|lookup:'new' }}</td>
|
<td>{{ workout|lookup:'new' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -2008,6 +2008,18 @@ def workout_c2import_view(request,page=1,userid=0,message=""):
|
|||||||
'page':page,
|
'page':page,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
importlistviews = {
|
||||||
|
'c2':'workout_c2import_view',
|
||||||
|
'strava':'workout_stravaimport_view',
|
||||||
|
'polar':'workout_polarimport_view',
|
||||||
|
'ownapi':'workout_view',
|
||||||
|
'runkeeper':'workout_runkeeperimport_view',
|
||||||
|
'sporttracks':'workout_sporttracksimport_view',
|
||||||
|
'trainingpeaks':'workout_view',
|
||||||
|
'underarmour':'workout_underarmourimport_view',
|
||||||
|
'nk':'workout_nkimport_view',
|
||||||
|
}
|
||||||
|
|
||||||
importsources = {
|
importsources = {
|
||||||
'c2':c2stuff,
|
'c2':c2stuff,
|
||||||
'strava':stravastuff,
|
'strava':stravastuff,
|
||||||
@@ -2018,7 +2030,7 @@ importsources = {
|
|||||||
'trainingpeaks':tpstuff,
|
'trainingpeaks':tpstuff,
|
||||||
'underarmour':underarmourstuff,
|
'underarmour':underarmourstuff,
|
||||||
'nk':nkstuff,
|
'nk':nkstuff,
|
||||||
}
|
}
|
||||||
|
|
||||||
@login_required()
|
@login_required()
|
||||||
def workout_getrp3importview(request,externalid):
|
def workout_getrp3importview(request,externalid):
|
||||||
@@ -2049,7 +2061,8 @@ def workout_getimportview(request,externalid,source = 'c2',do_async=False):
|
|||||||
|
|
||||||
if do_async: # pragma: no cover
|
if do_async: # pragma: no cover
|
||||||
messages.info(request,"Your workout will be imported in the background")
|
messages.info(request,"Your workout will be imported in the background")
|
||||||
url = reverse('workouts_view')
|
# this should return to the respective import list page
|
||||||
|
url = reverse(importlistviews[source])
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
if not data: # pragma: no cover
|
if not data: # pragma: no cover
|
||||||
|
|||||||
Reference in New Issue
Block a user