aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-11-10 15:25:01 -0600
committerAndy Doan <andy.doan+gerrit@linaro.org>2015-11-24 15:42:17 +0000
commitff26af5da18273d7b553c104ac9dd79747091109 (patch)
tree31d43777f5a5c07e635ab8c10095d220724d3a07 /templates
parentfeafa42d1beaa8ba4d4430cdbff6bdfcacb3adc7 (diff)
reports: Add per country report
Produce a report like: <https://weblogs.linaro.org/restricted/releases.linaro.org/reports/report.html?cycle=2015.08&report=countries> Change-Id: If4e6752720dac401a1e4b11374a6569352c90e42
Diffstat (limited to 'templates')
-rw-r--r--templates/report_cycles.html1
-rw-r--r--templates/reports_country.html18
2 files changed, 19 insertions, 0 deletions
diff --git a/templates/report_cycles.html b/templates/report_cycles.html
index b060536..b24d881 100644
--- a/templates/report_cycles.html
+++ b/templates/report_cycles.html
@@ -8,6 +8,7 @@
<td>{{month}}</td>
<td><a href="./{{month}}/downloads/?by=component">By Component</a></td>
<td><a href="./{{month}}/downloads/?by=build">By Build</a></td>
+ <td><a href="./{{month}}/country/">By Country</a></td>
</tr>
{% endfor %}
</table>
diff --git a/templates/reports_country.html b/templates/reports_country.html
new file mode 100644
index 0000000..203c3ec
--- /dev/null
+++ b/templates/reports_country.html
@@ -0,0 +1,18 @@
+{% extends base_page %}
+
+{% block content %}
+<h2>{{year_month}} Downloads by Country</h2>
+<table>
+<tr>
+ <th>Country</th><th>Components</th><th>Builds</th><th>Total</th>
+</tr>
+{% for download in downloads %}
+<tr>
+ <td>{{download.country}}</td>
+ <td>{{download.components}}</td>
+ <td>{{download.builds}}</td>
+ <td>{{download.total}}</td>
+</tr>
+{% endfor %}
+</table>
+{% endblock %}