summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-10-03 18:03:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:39:50 +0000
commita1f7a09801c2240b5f9a29683a2b538fcb9991d6 (patch)
treecc80a89b15fbac86fb01defc6c789bf582921986 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parentc7382dbd8bb273062164e7cdb7233b60874c91d3 (diff)
downloadpoky-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.py11
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
24from django import template 24from django import template
25from django.utils import timezone 25from django.utils import timezone
26from django.template.defaultfilters import filesizeformat 26from django.template.defaultfilters import filesizeformat
27import json as JsonLib
27 28
28register = template.Library() 29register = 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')
46def mapselect(value, argument):
47 return map(lambda x: vars(x)[argument], value)
48
49
50@register.filter(name = "json")
51def json(value):
52 return JsonLib.dumps(value)
53
43@register.assignment_tag 54@register.assignment_tag
44def query(qs, **kwargs): 55def query(qs, **kwargs):
45 """ template tag which allows queryset filtering. Usage: 56 """ template tag which allows queryset filtering. Usage: