From 65c298dedf75ae3fb1ff90ba5e4e8e53b8e2f390 Mon Sep 17 00:00:00 2001 From: Belen Barros Pena Date: Fri, 21 Feb 2014 08:58:01 +0000 Subject: bitbake: toaster: Fix help text for task details outcome Changes made to models.py and task.html to make sure the help text for the task outcome is displayed. [YOCTO #5917] (Bitbake rev: f3001af0b73f103a5d37af180e8c4c54a6249e97) Signed-off-by: Belen Barros Pena Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 20 ++++++++++---------- bitbake/lib/toaster/toastergui/templates/task.html | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 6706da8a5e..0646813552 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -140,14 +140,14 @@ class Task(models.Model): (OUTCOME_EMPTY, 'Empty'), ) - TASK_OUTCOME_HELP = { - OUTCOME_SUCCESS:'This task completed successfully', - OUTCOME_COVERED:'This task did not run because its output is provided by another task', - OUTCOME_CACHED:'This task restored output from the sstate-cache directory or mirrors', - OUTCOME_PREBUILT:'This task did not run because its outcome was reused from a previous build', - OUTCOME_FAILED:'This task did not complete', - OUTCOME_NA:'' - } + TASK_OUTCOME_HELP = ( + (OUTCOME_SUCCESS, 'This task completed successfully'), + (OUTCOME_COVERED, 'This task did not run because its output is provided by another task'), + (OUTCOME_CACHED, 'This task restored output from the sstate-cache directory or mirrors'), + (OUTCOME_PREBUILT, 'This task did not run because its outcome was reused from a previous build'), + (OUTCOME_FAILED, 'This task did not complete'), + (OUTCOME_NA, ''), + ) search_allowed_fields = [ "recipe__name", "recipe__version", "task_name", "logfile" ] @@ -156,8 +156,8 @@ class Task(models.Model): def get_related_setscene(self): return Task.objects.related_setscene(self) - def outcome_help(self): - return Task.TASK_OUTCOME_HELP[self.outcome] + def get_outcome_help(self): + return Task.TASK_OUTCOME_HELP[self.outcome][1] def get_executed_display(self): if self.task_executed: diff --git a/bitbake/lib/toaster/toastergui/templates/task.html b/bitbake/lib/toaster/toastergui/templates/task.html index c5d6176b62..a8bcb52194 100644 --- a/bitbake/lib/toaster/toastergui/templates/task.html +++ b/bitbake/lib/toaster/toastergui/templates/task.html @@ -18,7 +18,7 @@ {# Outcome section #}

{{task.get_outcome_display}} - +

{%if task.task_executed %} {# executed tasks outcome #} -- cgit v1.2.3-54-g00ecf