@@ -76,6 +76,10 @@ $(document).ready(function() {
</th>
<th>
+ <span title="Success / Warning / Fail">S/W/F</span>
+ </th>
+
+ <th>
{% ifequal order.name "date" %}
<a class="colactive"
href="{% listurl order=order.reversed_name %}"><span
@@ -154,6 +158,7 @@ $(document).ready(function() {
<td><a href="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
>{{ patch.name|default:"[no subject]"|truncatechars:100 }}</a></td>
<td style="white-space: nowrap;">{{ patch|patch_tags }}</td>
+ <td style="white-space: nowrap;">{{ patch|patch_checks }}</td>
<td>{{ patch.date|date:"Y-m-d" }}</td>
<td>{{ patch.submitter|personify:project }}</td>
<td>{{ patch.delegate.username }}</td>
@@ -1,5 +1,6 @@
# Patchwork - automated patch tracking system
# Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org>
+# Copyright (C) 2015 Intel Corporation
#
# This file is part of the Patchwork package.
#
@@ -20,6 +21,8 @@
from django import template
from django.utils.safestring import mark_safe
+from patchwork.models import Check
+
register = template.Library()
@@ -37,3 +40,14 @@ def patch_tags(patch):
return mark_safe('<span title="%s">%s</span>' % (
' / '.join(titles),
' '.join(counts)))
+
+
+@register.filter(name='patch_checks')
+def patch_checks(patch):
+ required = [Check.STATE_SUCCESS, Check.STATE_WARNING, Check.STATE_FAIL]
+ titles = ['Success', 'Warning', 'Fail']
+ counts = patch.check_count
+
+ return mark_safe('<span title="%s">%s</span>' % (
+ ' / '.join(titles),
+ ' '.join([str(counts[state]) for state in required])))
Add a column to display the important "checks" fields for each patch. Note that only the "completed" checks are shown (i.e. "in progress" and "not started" checks are ignored). Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> --- patchwork/templates/patchwork/patch-list.html | 5 +++++ patchwork/templatetags/patch.py | 14 ++++++++++++++ 2 files changed, 19 insertions(+)