fixing logged out view
This commit is contained in:
@@ -194,6 +194,9 @@ def get_video_data(w,groups=['basic'],mode='water'):
|
|||||||
|
|
||||||
for c in columns:
|
for c in columns:
|
||||||
if c != 'time':
|
if c != 'time':
|
||||||
|
if dict(rowingmetrics)[c]['numtype'] == 'integer':
|
||||||
|
data[c] = df2[c].astype(int).tolist()
|
||||||
|
else:
|
||||||
data[c] = df2[c].values.tolist()
|
data[c] = df2[c].values.tolist()
|
||||||
metrics[c] = {
|
metrics[c] = {
|
||||||
'name': dict(rowingmetrics)[c]['verbose_name'],
|
'name': dict(rowingmetrics)[c]['verbose_name'],
|
||||||
|
|||||||
@@ -2954,8 +2954,6 @@ def interactive_chart_video(videodata):
|
|||||||
spm = videodata['spm']
|
spm = videodata['spm']
|
||||||
time = range(len(spm))
|
time = range(len(spm))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data = zip(time,spm)
|
data = zip(time,spm)
|
||||||
|
|
||||||
data2 = []
|
data2 = []
|
||||||
@@ -2985,7 +2983,27 @@ def interactive_chart_video(videodata):
|
|||||||
|
|
||||||
var myChart = new Chart(ctx, {
|
var myChart = new Chart(ctx, {
|
||||||
type: 'scatter',
|
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:
|
data:
|
||||||
{
|
{
|
||||||
datasets: [
|
datasets: [
|
||||||
@@ -3004,6 +3022,7 @@ def interactive_chart_video(videodata):
|
|||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var marker = {
|
var marker = {
|
||||||
datapoint: %s ,
|
datapoint: %s ,
|
||||||
setLatLng: function (LatLng) {
|
setLatLng: function (LatLng) {
|
||||||
|
|||||||
@@ -74,12 +74,17 @@
|
|||||||
<li class="grid_4">
|
<li class="grid_4">
|
||||||
<p>Paste link to you tube video below</p>
|
<p>Paste link to you tube video below</p>
|
||||||
<p>Use the slider to locate start point for video on workout map</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>
|
to move around in the video and play it.</p>
|
||||||
<p>You can make manual adjustments to the delay to fine tune the alignment.
|
<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>
|
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>
|
<p>Once you are happy with the alignment, you can save the analysis, and share with other people.</p>
|
||||||
</li>
|
</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 %}
|
{% endif %}
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<div id="theplot" class="flexplot mapdiv">
|
<div id="theplot" class="flexplot mapdiv">
|
||||||
@@ -206,6 +211,10 @@
|
|||||||
<li class="grid_4">
|
<li class="grid_4">
|
||||||
<input type="checkbox" name="lock" id="lock" value="Lock">Lock Data and Video
|
<input type="checkbox" name="lock" id="lock" value="Lock">Lock Data and Video
|
||||||
</li>
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="grid_4">
|
||||||
|
<input type="hidden" name="lock" id="lock" value="Lock">
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>
|
<li>
|
||||||
Data Time
|
Data Time
|
||||||
@@ -271,6 +280,8 @@
|
|||||||
{{ metricsform.as_table }}
|
{{ metricsform.as_table }}
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<input type="hidden" id="id_delay" value="{{ analysis.delay }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>
|
<li>
|
||||||
{% if analysis and user.is_authenticated and user == rower.user %}
|
{% if analysis and user.is_authenticated and user == rower.user %}
|
||||||
|
|||||||
Reference in New Issue
Block a user