diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-10-03 18:03:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-10-30 13:39:50 +0000 |
commit | a1f7a09801c2240b5f9a29683a2b538fcb9991d6 (patch) | |
tree | cc80a89b15fbac86fb01defc6c789bf582921986 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |
parent | c7382dbd8bb273062164e7cdb7233b60874c91d3 (diff) | |
download | poky-a1f7a09801c2240b5f9a29683a2b538fcb9991d6.tar.gz |
bitbake: toaster: changes to the landing page
This patch brings in a new landing page to be shown
when there are no builds and no projects available.
The builds page now displays only only the builds part,
without the landing page bits.
There is a new projects page that displays the All Projects
table as specified in the design.
[YOCTO #6682]
(Bitbake rev: c6c7c05521daa9bf16c122d7d472330ca4c05e88)
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.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py index b953aa1580..4a97eb7ac4 100644 --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |||
@@ -24,6 +24,7 @@ import re | |||
24 | from django import template | 24 | from django import template |
25 | from django.utils import timezone | 25 | from django.utils import timezone |
26 | from django.template.defaultfilters import filesizeformat | 26 | from django.template.defaultfilters import filesizeformat |
27 | import json as JsonLib | ||
27 | 28 | ||
28 | register = template.Library() | 29 | register = template.Library() |
29 | 30 | ||
@@ -40,6 +41,16 @@ def sectohms(time): | |||
40 | hours = int(tdsec / 3600) | 41 | hours = int(tdsec / 3600) |
41 | return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60) | 42 | return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60) |
42 | 43 | ||
44 | |||
45 | @register.filter(name = 'mapselect') | ||
46 | def mapselect(value, argument): | ||
47 | return map(lambda x: vars(x)[argument], value) | ||
48 | |||
49 | |||
50 | @register.filter(name = "json") | ||
51 | def json(value): | ||
52 | return JsonLib.dumps(value) | ||
53 | |||
43 | @register.assignment_tag | 54 | @register.assignment_tag |
44 | def query(qs, **kwargs): | 55 | def query(qs, **kwargs): |
45 | """ template tag which allows queryset filtering. Usage: | 56 | """ template tag which allows queryset filtering. Usage: |