diff mbox

[Branch,~linaro-validation/lava-dashboard/trunk] Rev 312: actually display the number of fails in the bundle stream view (Andy Doan)

Message ID 20120422234517.20035.63302.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson April 22, 2012, 11:45 p.m. UTC
Merge authors:
  Andy Doan (doanac)
Related merge proposals:
  https://code.launchpad.net/~doanac/lava-dashboard/pass-fail-fix/+merge/102946
  proposed by: Andy Doan (doanac)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 312 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Mon 2012-04-23 11:43:06 +1200
message:
  actually display the number of fails in the bundle stream view (Andy Doan)
modified:
  dashboard_app/views.py


--
lp:lava-dashboard
https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk

You are subscribed to branch lp:lava-dashboard.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'dashboard_app/views.py'
--- dashboard_app/views.py	2012-03-26 04:05:55 +0000
+++ dashboard_app/views.py	2012-04-20 22:55:12 +0000
@@ -164,8 +164,8 @@ 
         '<code>{{ record.content_filename }}</code></a>',
         verbose_name="bundle name")
 
-    passes = TemplateColumn('{{ record.get_summary_results.pass }}')
-    fails = TemplateColumn('{{ record.get_summary_results.pass }}')
+    passes = TemplateColumn('{{ record.get_summary_results.pass|default:"0" }}')
+    fails = TemplateColumn('{{ record.get_summary_results.fail|default:"0" }}')
     total_results = TemplateColumn('{{ record.get_summary_results.total }}')
 
     uploaded_on = TemplateColumn('{{ record.uploaded_on|date:"Y-m-d H:i:s"}}')
@@ -346,7 +346,7 @@ 
                 "analyzer_assigned_date",  # used by the view
                 "bundle__uploaded_on",  # needed by Bundle.get_absolute_url
                 "bundle__content_sha1",   # needed by Bundle.get_absolute_url
-                "bundle__bundle_stream__pathname",  # Needed by TestRun.get_absolute_url 
+                "bundle__bundle_stream__pathname",  # Needed by TestRun.get_absolute_url
                 "test__name",  # needed by Test.__unicode__
                 "test__test_id",  # needed by Test.__unicode__
             )
@@ -553,7 +553,7 @@ 
         template_object_name="attachment",
         extra_context={
             'bread_crumb_trail': BreadCrumbTrail.leading_to(
-                attachment_list, 
+                attachment_list,
                 pathname=pathname,
                 content_sha1=content_sha1,
                 analyzer_assigned_uuid=analyzer_assigned_uuid),
@@ -646,14 +646,14 @@ 
     try:
         data_view = DataView.repository.get(name=name)
     except DataView.DoesNotExist:
-        raise Http404('No data view matches the given query.') 
+        raise Http404('No data view matches the given query.')
     return render_to_response(
         "dashboard_app/data_view_detail.html", {
             'bread_crumb_trail': BreadCrumbTrail.leading_to(
                 data_view_detail,
                 name=data_view.name,
                 summary=data_view.summary),
-            "data_view": data_view 
+            "data_view": data_view
         }, RequestContext(request))
 
 
@@ -756,7 +756,7 @@ 
 
 
 from lava_projects.models import Project
-from lava_projects.views import project_detail 
+from lava_projects.views import project_detail
 from dashboard_app.forms import TestingEffortForm
 
 
@@ -802,7 +802,7 @@ 
     parent=testing_effort_detail,
     needs=["pk"])
 @login_required
-def testing_effort_update(request, pk): 
+def testing_effort_update(request, pk):
     try:
         effort = TestingEffort.objects.get(pk=pk)
     except TestingEffort.DoesNotExist: