mirror of
https://github.com/sstent/Garmin_Analyser.git
synced 2026-01-25 16:42:40 +00:00
removing old endpoints etc
This commit is contained in:
89
visualizers/templates/summary_report.html
Normal file
89
visualizers/templates/summary_report.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Workout Summary Report</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
h1, h2 {
|
||||
color: #333;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
}
|
||||
th, td {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
th {
|
||||
background-color: #f8f9fa;
|
||||
font-weight: bold;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #eee;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Workout Summary Report</h1>
|
||||
|
||||
<h2>All Workouts</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Sport</th>
|
||||
<th>Duration</th>
|
||||
<th>Distance (km)</th>
|
||||
<th>Avg Speed (km/h)</th>
|
||||
<th>Avg HR</th>
|
||||
<th>NP</th>
|
||||
<th>IF</th>
|
||||
<th>TSS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for analysis in analyses %}
|
||||
<tr>
|
||||
<td>{{ analysis.summary.start_time.strftime('%Y-%m-%d') if analysis.summary.start_time else 'N/A' }}</td>
|
||||
<td>{{ analysis.summary.sport if analysis.summary.sport else 'N/A' }}</td>
|
||||
<td>{{ analysis.summary.duration_minutes|format_duration if analysis.summary.duration_minutes else 'N/A' }}</td>
|
||||
<td>{{ "%.2f"|format(analysis.summary.distance_km) if analysis.summary.distance_km else 'N/A' }}</td>
|
||||
<td>{{ "%.1f"|format(analysis.summary.avg_speed_kmh) if analysis.summary.avg_speed_kmh else 'N/A' }}</td>
|
||||
<td>{{ "%.0f"|format(analysis.summary.avg_hr) if analysis.summary.avg_hr else 'N/A' }}</td>
|
||||
<td>{{ "%.0f"|format(analysis.summary.normalized_power) if analysis.summary.normalized_power else 'N/A' }}</td>
|
||||
<td>{{ "%.2f"|format(analysis.summary.intensity_factor) if analysis.summary.intensity_factor else 'N/A' }}</td>
|
||||
<td>{{ "%.1f"|format(analysis.summary.training_stress_score) if analysis.summary.training_stress_score else 'N/A' }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="footer">
|
||||
<p>Report generated on {{ report.generated_at }} using {{ report.tool }} v{{ report.version }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -159,6 +159,40 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% if minute_by_minute %}
|
||||
<h2>Minute-by-Minute Analysis</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Minute</th>
|
||||
<th>Distance (km)</th>
|
||||
<th>Avg Speed (km/h)</th>
|
||||
<th>Avg Cadence</th>
|
||||
<th>Avg HR</th>
|
||||
<th>Max HR</th>
|
||||
<th>Avg Gradient (%)</th>
|
||||
<th>Elevation Change (m)</th>
|
||||
<th>Avg Power (W)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in minute_by_minute %}
|
||||
<tr>
|
||||
<td>{{ row.minute_index }}</td>
|
||||
<td>{{ "%.2f"|format(row.distance_km) if row.distance_km is not none }}</td>
|
||||
<td>{{ "%.1f"|format(row.avg_speed_kmh) if row.avg_speed_kmh is not none }}</td>
|
||||
<td>{{ "%.0f"|format(row.avg_cadence) if row.avg_cadence is not none }}</td>
|
||||
<td>{{ "%.0f"|format(row.avg_hr) if row.avg_hr is not none }}</td>
|
||||
<td>{{ "%.0f"|format(row.max_hr) if row.max_hr is not none }}</td>
|
||||
<td>{{ "%.1f"|format(row.avg_gradient) if row.avg_gradient is not none }}</td>
|
||||
<td>{{ "%.1f"|format(row.elevation_change) if row.elevation_change is not none }}</td>
|
||||
<td>{{ "%.0f"|format(row.avg_real_power or row.avg_power_estimate) if (row.avg_real_power or row.avg_power_estimate) is not none }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<div class="footer">
|
||||
<p>Report generated on {{ report.generated_at }} using {{ report.tool }} v{{ report.version }}</p>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
- **Average Speed:** {{ workout.speed_analysis.avg_speed|format_speed }}
|
||||
- **Maximum Speed:** {{ workout.speed_analysis.max_speed|format_speed }}
|
||||
|
||||
{% if minute_by_minute %}
|
||||
### Minute-by-Minute Analysis
|
||||
|
||||
| Minute | Dist (km) | Speed (km/h) | Cadence | HR | Max HR | Grad (%) | Elev (m) | Power (W) |
|
||||
|--------|-----------|--------------|---------|----|--------|----------|----------|-----------|
|
||||
{% for row in minute_by_minute -%}
|
||||
| {{ row.minute_index }} | {{ "%.2f"|format(row.distance_km) if row.distance_km is not none }} | {{ "%.1f"|format(row.avg_speed_kmh) if row.avg_speed_kmh is not none }} | {{ "%.0f"|format(row.avg_cadence) if row.avg_cadence is not none }} | {{ "%.0f"|format(row.avg_hr) if row.avg_hr is not none }} | {{ "%.0f"|format(row.max_hr) if row.max_hr is not none }} | {{ "%.1f"|format(row.avg_gradient) if row.avg_gradient is not none }} | {{ "%.1f"|format(row.elevation_change) if row.elevation_change is not none }} | {{ "%.0f"|format(row.avg_real_power or row.avg_power_estimate) if (row.avg_real_power or row.avg_power_estimate) is not none }} |
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
---
|
||||
|
||||
*Report generated on {{ report.generated_at }} using {{ report.tool }} v{{ report.version }}*
|
||||
Reference in New Issue
Block a user