Private
Public Access
1
0

Video Analysis Metrics Form renders but is not processed

This commit is contained in:
Sander Roosendaal
2019-11-12 21:33:11 +01:00
parent caa665b456
commit 6e69c292c6
7 changed files with 54 additions and 35 deletions

View File

@@ -63,10 +63,10 @@
<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>
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>
{% endif %}
@@ -140,8 +140,8 @@
// strokerate = spm[Math.round(datatime)];
// catchangle = ctch[Math.round(datatime)];
{% for id, metric in metrics.items %}
{{ id }}_now = {{ id }}_values[Math.round(datatime)];
// console.log(datatime,{{ id }}_now, "{{ metric.name }}")
{{ id }}_now = {{ id }}_values[Math.round(datatime)];
// console.log(datatime,{{ id }}_now, "{{ metric.name }}")
{% endfor %}
document.getElementById("time").innerHTML = Math.round(videotime);
@@ -210,7 +210,7 @@
</span> {{ metric.unit }}
</li>
{% endfor %}
<li class="grid">
<li class="grid_2">
<canvas id="angles"></canvas>
<script type="text/javascript" src="https://bernii.github.io/gauge.js/dist/gauge.js"></script>
<script>
@@ -237,33 +237,26 @@
gauge.set(-75);
</script>
</li>
<li class="grid_4">
{% if form %}
{% if not video_id %}
<p>
To load your video, paste the URL of your YouTube video in the form below,
and submit the form.
</p>
{% else %}
<p>
Change parameters in the form and press Reload to see the result. When
you are ready to permanently save the video analysis, press Save.
</p>
{% endif %}
<p>
<form enctype="multipart/form-data" action="" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
{% if not analysis.id %}
<input type="submit" name="reload_button" value="Reload">
{% endif %}
<input type="submit" name="save_button" value="Save">
</form>
</p>
{% endif %}
</li>
</ul>
<form enctype="multipart/form-data" action="" method="post">
<ul class="main-content">
{% if form %}
<li class="grid_2">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
{% if not analysis.id %}
<input type="submit" name="reload_button" value="Reload">
{% endif %}
<input type="submit" name="save_button" value="Save">
</li>
<li class="grid_2">
<table>
{{ metricsform.as_table }}
</table>
</li>
{% endif %}
<li>
{% if analysis and user.is_authenticated and user == rower.user %}
<p>
@@ -272,6 +265,7 @@
{% endif %}
</li>
</ul>
</form>
<script>
// lock
var lock = document.getElementById("lock");