diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-01-14 12:46:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-16 08:25:31 +0000 |
commit | 2d78912bc62b7452433e3c785327d542449e3011 (patch) | |
tree | 279414cc98424924973d6aa0d378a3b8396b24f3 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |
parent | ce784879f48086ba8d33d7589293afbaf94780a0 (diff) | |
download | poky-2d78912bc62b7452433e3c785327d542449e3011.tar.gz |
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 <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 | 19 |
1 files changed, 19 insertions, 0 deletions
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): | |||
65 | """ | 65 | """ |
66 | return qs.filter(**kwargs) | 66 | return qs.filter(**kwargs) |
67 | 67 | ||
68 | |||
69 | @register.filter("whitespace_slice") | ||
70 | def whitespace_space_filter(value, arg): | ||
71 | try: | ||
72 | bits = [] | ||
73 | for x in arg.split(":"): | ||
74 | if len(x) == 0: | ||
75 | bits.append(None) | ||
76 | else: | ||
77 | # convert numeric value to the first whitespace after | ||
78 | first_whitespace = value.find(" ", int(x)) | ||
79 | if first_whitespace == -1: | ||
80 | bits.append(int(x)) | ||
81 | else: | ||
82 | bits.append(first_whitespace) | ||
83 | return value[slice(*bits)] | ||
84 | except (ValueError, TypeError): | ||
85 | raise | ||
86 | |||
68 | @register.filter | 87 | @register.filter |
69 | def divide(value, arg): | 88 | def divide(value, arg): |
70 | if int(arg) == 0: | 89 | if int(arg) == 0: |