summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2012-03-27 15:18:46 -0500
committerAndy Doan <andy.doan@linaro.org>2012-03-27 15:18:46 -0500
commitcc8929c32643ba718cf7510af422db247af2758a (patch)
tree4c4a17e24a7718cedaa39e3f0f8c91f0986ae22b
parentb6ae6ae25333a1949e31c226e2bcf115f6977d3b (diff)
downloadandroid_benchmark_views-cc8929c32643ba718cf7510af422db247af2758a.tar.gz
allow report comments for index page
This is a small hack to allow providing comments to the "index" report we make. It queries the database for a report named "index" if this exists, it will use its comments when rendering the report. NOTE: The "Can publish" should be left unset (false) so that it doesn't show up as a normal report users can view. Signed-off-by: Andy Doan <andy.doan@linaro.org>
-rw-r--r--android_benchmark_views_app/templates/android_benchmark_views_app/index.html8
-rw-r--r--android_benchmark_views_app/views.py5
2 files changed, 13 insertions, 0 deletions
diff --git a/android_benchmark_views_app/templates/android_benchmark_views_app/index.html b/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
index f6aa583..c78b081 100644
--- a/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
+++ b/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
@@ -7,8 +7,16 @@
<li><a href="reports/{{report.series}}">{{ report.series }}</a></li>
{% endfor %}
</ul>
+
+{% if report.comments %}
+<h3>Comments</h3>
+<pre>
+{{report.comments}}
+</pre>
+{% endif %}
{% endblock %}
{% block report_title %}
<h2>Reports Over Time</h2>
+
{% endblock %}
diff --git a/android_benchmark_views_app/views.py b/android_benchmark_views_app/views.py
index 7fb82a6..041426e 100644
--- a/android_benchmark_views_app/views.py
+++ b/android_benchmark_views_app/views.py
@@ -45,6 +45,10 @@ def index(request):
# fake out data so that we can compare GCC 4.6 performance
# over the last 6 months
report = BenchmarkReport()
+ report_index = BenchmarkReport.objects.filter(series='index')
+ if report_index.count() == 1:
+ report = report_index[0]
+
runs = []
for r in history_reports:
run = BenchmarkRun()
@@ -56,6 +60,7 @@ def index(request):
return render_to_response(
"android_benchmark_views_app/index.html", {
+ 'report': report,
'reports': reports,
'runs': runs,