[bitbake-devel,14/19] bitbake:toaster: Not using task_color tag for execution heading

Submitted by Alexandru DAMIAN on March 14, 2014, 5:58 p.m.


Message ID 9516827571b3cf9ceaa38e716360d1fc052d22f4.1394819783.git.alexandru.damian@intel.com
State New
Headers show

Commit Message

Alexandru DAMIAN March 14, 2014, 5:58 p.m.
From: Belen Barros Pena <belen.barros.pena@intel.com>

The modifications to the task_color tag in commit
23a7c338d387ac2ba13a7a1114a4abc75228c960 broke the styling
of failed tasks in the tasks.html template. Undo the
changes to the task_color tag and use an if statement
instead to set the .muted class when the execution
heading says "Not executed".

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
 lib/toaster/toastergui/templates/task.html         | 9 +++++----
 lib/toaster/toastergui/templatetags/projecttags.py | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/lib/toaster/toastergui/templates/task.html b/lib/toaster/toastergui/templates/task.html
index af994fd..7c5b743 100644
--- a/lib/toaster/toastergui/templates/task.html
+++ b/lib/toaster/toastergui/templates/task.html
@@ -131,15 +131,16 @@ 
 {% endif %}
 {# Execution section #}
-<h2 {{task|task_color}}>
     {% if task.task_executed %}
+	<h2>
         <i class="icon-question-sign get-help heading-help" title="Executed tasks are those that need to run in order to generate the task output"></i>
-     {% else %}
+    {% else %}
+	<h2 class="muted">
         Not Executed
         <i class="icon-question-sign get-help heading-help" title="Not executed tasks don't need to run because their outcome is provided by another task"></i>
-     {% endif %}
+    {% endif %}
+	</h2>
 <dl class="dl-horizontal">
         <i class="icon-question-sign get-help" title="To make builds more efficient, the build system detects changes in the 'inputs' to a given task by creating a 'task signature'. If the signature changes, the build system assumes the inputs have changed and the task needs to be rerun"></i>
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py
index 2d339d6..857680b 100644
--- a/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/lib/toaster/toastergui/templatetags/projecttags.py
@@ -70,16 +70,16 @@  def sortcols(tablecols):
     return sorted(tablecols, key = lambda t: t['name'])
-def task_color(task_object, show_colour=False):
+def task_color(task_object, show_green=False):
     """ Return css class depending on Task execution status and execution outcome.
         By default, green is not returned for executed and successful tasks;
         show_green argument should be True to get green color.
     if not task_object.task_executed:
         return 'class=muted'
-    elif task_object.outcome == task_object.OUTCOME_FAILED and show_colour:
+    elif task_object.outcome == task_object.OUTCOME_FAILED:
         return 'class=error'
-    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_colour:
+    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_green:
         return 'class=green'
         return ''