summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorRavi Chintakunta <ravi.chintakunta@timesys.com>2014-02-17 23:30:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:24:00 -0700
commit31d4bf8484ee42690386c6b7a6bd6c7a2be54464 (patch)
treeb9ef1f8c22dc51445c9ba6a35f05e091262a47b2 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parent2bd19cd02623b7c5494c2f7057587252a75746c9 (diff)
downloadpoky-31d4bf8484ee42690386c6b7a6bd6c7a2be54464.tar.gz
bitbake: toaster: View detailed information about a task
Information about a task is displayed depending on it's execution status and outcome status. Edited to iterate through all possible entries for related setscene tasks. [YOCTO #4282] (Bitbake rev: 62f502b1237d4060df6be1ee4f4865db5fa39a6a) Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 7e2c8e98fa..b1e573b16d 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -70,13 +70,17 @@ def sortcols(tablecols):
70 return sorted(tablecols, key = lambda t: t['name']) 70 return sorted(tablecols, key = lambda t: t['name'])
71 71
72@register.filter 72@register.filter
73def task_color(task_object): 73def task_color(task_object, show_green=False):
74 """ Return css class depending on Task execution status and execution outcome 74 """ Return css class depending on Task execution status and execution outcome.
75 By default, green is not returned for executed and successful tasks;
76 show_green argument should be True to get green color.
75 """ 77 """
76 if not task_object.task_executed: 78 if not task_object.task_executed:
77 return 'class=muted' 79 return 'class=muted'
78 elif task_object.outcome == task_object.OUTCOME_FAILED: 80 elif task_object.outcome == task_object.OUTCOME_FAILED:
79 return 'class=error' 81 return 'class=error'
82 elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_green:
83 return 'class=green'
80 else: 84 else:
81 return '' 85 return ''
82 86