From 4f7182775cfa39c589e2e4693b1769127d7dd4d4 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 23 Jan 2015 17:36:14 +0000 Subject: bitbake: toastergui: update project build listing We update the build listings in the project mode to enable proper display and selection of build requests that do not have an actual build object because the bitbake process did not start. We add a page to display error details for build requests that did not start a build. Fixing errors and misspelling in build sections. Sorting by "timespent" is disabled for build-listing pages. [YOCTO #7165] [YOCTO #7156] [YOCTO #7196] [YOCTO #7188] (Bitbake rev: ee13bf45cecd6a0132d724b3206a6f4515669496) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bitbake/lib/toaster/bldcontrol/models.py') diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index 2386d2345a..dc4afca2f7 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py @@ -113,6 +113,15 @@ class BuildRequest(models.Model): created = models.DateTimeField(auto_now_add = True) updated = models.DateTimeField(auto_now = True) + def get_duration(self): + return (self.updated - self.created).total_seconds() + + def get_sorted_target_list(self): + tgts = self.brtarget_set.order_by( 'target' ); + return( tgts ); + + def get_machine(self): + return self.brvariable_set.get(name="MACHINE").value # These tables specify the settings for running an actual build. # They MUST be kept in sync with the tables in orm.models.Project* -- cgit v1.2.3-54-g00ecf