summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2018-09-05 09:28:36 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2018-09-05 09:28:36 +0800
commit15d42b237043068ade83f5eaa1db35079333cce5 (patch)
tree4da684eabe8bb0a5a1a49c5ae4b830dc0d3e0f3f
parent02562f18085021f7eb7e4fb80bed9e1c18e298b9 (diff)
sort trenddata for display
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--report/templates/test_report.html2
-rw-r--r--report/views.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/report/templates/test_report.html b/report/templates/test_report.html
index fb07920..0bdc172 100644
--- a/report/templates/test_report.html
+++ b/report/templates/test_report.html
@@ -613,7 +613,7 @@ No result for vts test jobs.
{% endfor %}
</table>
{% else %}
-Excelent build, no open bugs on it at the moment.
+Excellent build, no open bugs on it at the moment.
{% endif %}
<h2>Jobs Duration:</h2>
diff --git a/report/views.py b/report/views.py
index 7329838..a7bded5 100644
--- a/report/views.py
+++ b/report/views.py
@@ -1521,11 +1521,15 @@ def show_trend(request):
one_build['test_cases_res'] = test_cases_res
trend_data.append(one_build)
+ def get_buildno(item):
+ return item.get('build_no')
+
+ sorted_trend_data = sorted(trend_data, key=get_buildno, reverse=True)
return render(request, 'show_trend.html',
{
"build_name": build_name,
"test_cases": test_cases,
- "trend_data": trend_data
+ "trend_data": sorted_trend_data
})