From 44f37394ed3e4ca02f940be172fe4395b0ee0f7d Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 17 Jun 2015 17:30:34 +0100 Subject: toaster: refactor build model We remove the "timespent", "errors_no" and "warnings_no" fields in favor of computing the needed values at runtime. This prevents inconsistencies in the UI. Also removeing all references to BuildRequests from the interface - all build details now display in the build dashboard. Minor fixes related to data logging. Signed-off-by: Alexandru DAMIAN --- .../toastergui/templates/builddashboard.html | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/toaster/toastergui/templates/builddashboard.html') diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html index 47b8d7aa1..bab8e388f 100644 --- a/lib/toaster/toastergui/templates/builddashboard.html +++ b/lib/toaster/toastergui/templates/builddashboard.html @@ -23,22 +23,23 @@ on {{build.completed_on|date:"d/m/y H:i"}} -{% if build.warnings_no or build.errors_no %} +{% if build.warnings.count or build.errors.count %}  with {% endif %} {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} -{% if build.errors_no %} - {{build.errors_no}} error{{build.errors_no|pluralize}} +{% if build.errors.count %} + {{build.errors.count}} error{{build.errors.count|pluralize}} {% endif %} -{% if build.warnings_no %} -{% if build.errors_no %} +{% if build.warnings.count %} +{% if build.errors.count %} and {% endif %} - {{build.warnings_no}} warning{{build.warnings_no|pluralize}} + {{build.warnings.count}} warning{{build.warnings.count|pluralize}} {% endif %} - Build time: {{ build.timespent|sectohms }} + Build time: {{ build.timespent_seconds|sectohms }} Download build log + {%endif%} {% if build.toaster_exceptions.count > 0 %} @@ -52,14 +53,14 @@ -{% if build.errors_no %} +{% if build.errors.count %} -{% if build.warnings_no %} +{% if build.warnings.count %}