make perf manager load faster
This commit is contained in:
@@ -1257,6 +1257,13 @@ def performancemanager_view(request, userid=0, mode='rower',
|
|||||||
doform = therower.showfresh
|
doform = therower.showfresh
|
||||||
dofatigue = therower.showfit
|
dofatigue = therower.showfit
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
thediv = 'Submit form to create chart'
|
||||||
|
endfitness = 0
|
||||||
|
endfatigue = 0
|
||||||
|
endform = 0
|
||||||
|
ids = []
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = PerformanceManagerForm(request.POST)
|
form = PerformanceManagerForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
@@ -1268,21 +1275,22 @@ def performancemanager_view(request, userid=0, mode='rower',
|
|||||||
therower.showfresh = doform
|
therower.showfresh = doform
|
||||||
therower.showfatigue = dofatigue
|
therower.showfatigue = dofatigue
|
||||||
therower.save()
|
therower.save()
|
||||||
|
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
||||||
|
theuser, startdate=startdate, enddate=enddate,
|
||||||
|
kfitness=kfitness,
|
||||||
|
kfatigue=kfatigue,
|
||||||
|
metricchoice=metricchoice,
|
||||||
|
doform=doform,
|
||||||
|
dofatigue=dofatigue,
|
||||||
|
showtests=True,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
form = PerformanceManagerForm(initial={
|
form = PerformanceManagerForm(initial={
|
||||||
'doform': doform,
|
'doform': doform,
|
||||||
'dofatigue': dofatigue,
|
'dofatigue': dofatigue,
|
||||||
})
|
})
|
||||||
|
|
||||||
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
|
||||||
theuser, startdate=startdate, enddate=enddate,
|
|
||||||
kfitness=kfitness,
|
|
||||||
kfatigue=kfatigue,
|
|
||||||
metricchoice=metricchoice,
|
|
||||||
doform=doform,
|
|
||||||
dofatigue=dofatigue,
|
|
||||||
showtests=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
ids = pd.Series(ids, dtype='int').dropna().values
|
ids = pd.Series(ids, dtype='int').dropna().values
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user