summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-12-11 16:42:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:20:25 +0000
commit2251426ae420640c082ec0d0109b9be435075411 (patch)
tree0f58f48d18bbfd9054c928f3ef554365f74d6ed8 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parentc2fc6ca2fa68aca17235cac306b6df4b882fe9ff (diff)
downloadpoky-2251426ae420640c082ec0d0109b9be435075411.tar.gz
bitbake: toaster: Create the base page navigation structure
Updating the general container pages to use the graphical design and features from the design phase. In the process of adapting the Simple UI to the designed interface, we create all the pages and the navigation structure for the Toaster GUI. Views for each page have been added, and the url mapping has been updated to reflect newly added pages. The table page has been refactored to be component-oriented instead of class-oriented in order to facilitate reusage. Changes are made in different layers of the template (base, basetable) in order to maximize code reuse among different pages in the build. (Bitbake rev: d31f039ae31b77023722c06e66542751536a1362) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 0c0d804c0c..5f60379932 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -24,3 +24,8 @@ register = template.Library()
24@register.simple_tag 24@register.simple_tag
25def time_difference(start_time, end_time): 25def time_difference(start_time, end_time):
26 return end_time - start_time 26 return end_time - start_time
27
28@register.filter(name = 'timespent')
29def timespent(build_object):
30 tdsec = (build_object.completed_on - build_object.started_on).total_seconds()
31 return "%02d:%02d:%02d" % (int(tdsec/3600), int((tdsec - tdsec/ 3600)/ 60), int(tdsec) % 60)