From c8714ec0cdcf84d31d9bd944df1923ea7e4339b4 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 9 Mar 2015 16:42:44 +0000 Subject: bitbake: toastergui: project page - consistent error display We modify the project page to provide a consistent view of the build errors. The display is now similar with the managed_mrb_section and links point to the buildrequest detail view. [YOCTO #7188] (Bitbake rev: d37eaaa48a63a137ded25a14911c97a5ae861ff6) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../lib/toaster/toastergui/templates/project.html | 50 ++++++++++++---------- bitbake/lib/toaster/toastergui/views.py | 5 ++- 2 files changed, 32 insertions(+), 23 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 54590ee..039601f 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -130,29 +130,35 @@ vim: expandtab tabstop=2 -
-
- + -
-
-
{[e.msg]}
- -
-

The target {[t]} is not provided by any of your project layers.

-

Your build has failed because the target {[t]} is not provided by any of your project layers.

- -

The following layers provide this target. You could add one of them to your project.

- -
-
-
- -

- Please contact your system administrator to help troubleshoot this error. -

-
-
+
+ + {[b.updated|date:'HH:mm']} + + + {[b.updated|date:'dd/MM/yy HH:mm']} + +
+
+ + + + {[b.errors.length]} + + + +
+
+ +
+
Build time: {[b.command_time|timediff]} + +
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 8034cfc..1e9df3f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -66,7 +66,10 @@ def _project_recent_build_list(prj): "id": x.pk, "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.brtarget_set.all()), "status": x.get_state_display(), - "errors": map(lambda y: {"type": y.errtype, "msg": y.errmsg, "tb": y.traceback}, x.brerror_set.exclude(errmsg__contains="Command Failed")), + "errors": map(lambda y: {"type": y.errtype, "msg": y.errmsg, "tb": y.traceback}, x.brerror_set.all()), + "updated": x.updated.strftime('%s')+"000", + "command_time": (x.updated - x.created).total_seconds(), + "br_page_url": reverse('buildrequestdetails', args=(x.project.id, x.pk) ), "build" : map( lambda y: {"id": y.pk, "status": y.get_outcome_display(), "completed_on" : y.completed_on.strftime('%s')+"000", -- cgit v1.1