From 2d78912bc62b7452433e3c785327d542449e3011 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 14 Jan 2015 12:46:54 +0000 Subject: bitbake: toastergui: all builds page lists failed build requests This patch modifies the all builds page by splitting the page into two variants - the "interactive" (default) and "managed" mode versions. In the "managed" mode version, we display build requests instead of builds, including the failed build requests that have no build associated with them. [YOCTO #6671] (Bitbake rev: c5f5fb80308228585aa7ff9721352feb5ed9c961) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../toaster/toastergui/templatetags/projecttags.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py') diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py index f564edfe49..276c6eb098 100644 --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py @@ -65,6 +65,25 @@ def query(qs, **kwargs): """ return qs.filter(**kwargs) + +@register.filter("whitespace_slice") +def whitespace_space_filter(value, arg): + try: + bits = [] + for x in arg.split(":"): + if len(x) == 0: + bits.append(None) + else: + # convert numeric value to the first whitespace after + first_whitespace = value.find(" ", int(x)) + if first_whitespace == -1: + bits.append(int(x)) + else: + bits.append(first_whitespace) + return value[slice(*bits)] + except (ValueError, TypeError): + raise + @register.filter def divide(value, arg): if int(arg) == 0: -- cgit v1.2.3-54-g00ecf