From 9e8304ea06376b7f4e9008bd038c4326af651e9c Mon Sep 17 00:00:00 2001 From: Ravi Chintakunta Date: Tue, 18 Mar 2014 15:17:31 -0400 Subject: [PATCH] bitbake: toaster: Display task description Display task description as content of help bubble for a task. [YOCTO #5748] (Bitbake rev: 4ffc380d11cff4e1d32d2bf5fb6c7cda6f7e22e6) Signed-off-by: Ravi Chintakunta Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 7 +++++++ bitbake/lib/toaster/toastergui/templates/recipe.html | 2 +- bitbake/lib/toaster/toastergui/templates/tasks.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 4975433..9c15ebf 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -174,6 +174,13 @@ class Task(models.Model): return "Executed" return "Not Executed" + def get_description(self): + variable = Variable.objects.filter(variable_name=self.task_name, build = self.build) + try: + return variable[0].description + except IndexError: + return '' + build = models.ForeignKey(Build, related_name='task_build') order = models.IntegerField(null=True) task_executed = models.BooleanField(default=False) # True means Executed, False means Not/Executed diff --git a/bitbake/lib/toaster/toastergui/templates/recipe.html b/bitbake/lib/toaster/toastergui/templates/recipe.html index e367077..b8898d2 100644 --- a/bitbake/lib/toaster/toastergui/templates/recipe.html +++ b/bitbake/lib/toaster/toastergui/templates/recipe.html @@ -112,7 +112,7 @@ {{task.order}} {{task.task_name}} - + {% if task.get_description %} {% endif %} {{task.get_executed_display}} diff --git a/bitbake/lib/toaster/toastergui/templates/tasks.html b/bitbake/lib/toaster/toastergui/templates/tasks.html index ca7e187..d68a31a 100644 --- a/bitbake/lib/toaster/toastergui/templates/tasks.html +++ b/bitbake/lib/toaster/toastergui/templates/tasks.html @@ -86,7 +86,7 @@ {{task.recipe.version}} - {{task.task_name}} + {{task.task_name}} {% if task.get_description %} {% endif %} {{task.get_executed_display}} -- 2.7.4