summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templatetags
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-05-20 00:34:56 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-29 11:58:25 +0100
commitae6349a13f11b6fa90fe5603b000bef14ee0f2f0 (patch)
treed3acf28e98b2fa26dfef858e07512d14b313de64 /lib/toaster/toastergui/templatetags
parent6492349d50a2048b1cbebab482bfd075bb48dd96 (diff)
downloadbitbake-ae6349a13f11b6fa90fe5603b000bef14ee0f2f0.tar.gz
toastergui: Consider task name when restarting a build in /builds
Previously the same issue was fixed for project view. 'Run again' button now restarts builds using target:task also in builds view. [YOCTO #7442] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'lib/toaster/toastergui/templatetags')
-rw-r--r--lib/toaster/toastergui/templatetags/projecttags.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py
index 1bc3bc231..8028ae002 100644
--- a/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/lib/toaster/toastergui/templatetags/projecttags.py
@@ -44,9 +44,10 @@ def sectohms(time):
return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60)
-@register.filter(name = 'mapselect')
-def mapselect(value, argument):
- return map(lambda x: vars(x)[argument], value)
+@register.filter(name = 'get_tasks')
+def get_tasks(queryset):
+ return list(target + ':' + task if task else target \
+ for target, task in queryset.values_list('target', 'task'))
@register.filter(name = "json")