diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 8 |
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 |
73 | def task_color(task_object): | 73 | def 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 | ||