Private
Public Access
1
0

fixing logged out view

This commit is contained in:
Sander Roosendaal
2019-11-18 15:55:54 +01:00
parent 01c02b2b02
commit 4508c75eee
3 changed files with 38 additions and 5 deletions

View File

@@ -194,7 +194,10 @@ def get_video_data(w,groups=['basic'],mode='water'):
for c in columns:
if c != 'time':
data[c] = df2[c].values.tolist()
if dict(rowingmetrics)[c]['numtype'] == 'integer':
data[c] = df2[c].astype(int).tolist()
else:
data[c] = df2[c].values.tolist()
metrics[c] = {
'name': dict(rowingmetrics)[c]['verbose_name'],
'metric': c,

View File

@@ -2954,8 +2954,6 @@ def interactive_chart_video(videodata):
spm = videodata['spm']
time = range(len(spm))
data = zip(time,spm)
data2 = []
@@ -2985,7 +2983,27 @@ def interactive_chart_video(videodata):
var myChart = new Chart(ctx, {
type: 'scatter',
label: 'pace',
label: 'SPM',
animationSteps: 10,
options: {
legend: {
display: false,
},
scales: {
yAxes: [{
scaleLabel: {
display: true,
labelString: 'Stroke Rate'
}
}],
xAxes: [{
scaleLabel: {
display: true,
labelString: 'Time (seconds)'
}
}],
}
},
data:
{
datasets: [
@@ -3004,6 +3022,7 @@ def interactive_chart_video(videodata):
},
});
var marker = {
datapoint: %s ,
setLatLng: function (LatLng) {

View File

@@ -74,12 +74,17 @@
<li class="grid_4">
<p>Paste link to you tube video below</p>
<p>Use the slider to locate start point for video on workout map</p>
<p>Playing the video will advance the data in synchonization. Use the regular youtube controls
<p>Playing the video will advance the data in synchonization. Use the regular YouTube
controls
to move around in the video and play it.</p>
<p>You can make manual adjustments to the delay to fine tune the alignment.
Once you are finished, check "Lock Video and Data" to lock the video and the data.</p>
<p>Once you are happy with the alignment, you can save the analysis, and share with other people.</p>
</li>
{% else %}
<li class="grid_4">
<p>Playing the video will advance the data in synchronization. Use the regular
YouTube controls to move around in the video and play it.</p>
{% endif %}
<li class="grid_2">
<div id="theplot" class="flexplot mapdiv">
@@ -206,6 +211,10 @@
<li class="grid_4">
<input type="checkbox" name="lock" id="lock" value="Lock">Lock Data and Video
</li>
{% else %}
<li class="grid_4">
<input type="hidden" name="lock" id="lock" value="Lock">
</li>
{% endif %}
<li>
Data Time
@@ -271,6 +280,8 @@
{{ metricsform.as_table }}
</table>
</li>
{% else %}
<input type="hidden" id="id_delay" value="{{ analysis.delay }}">
{% endif %}
<li>
{% if analysis and user.is_authenticated and user == rower.user %}