summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index c344c66bee..22c66a9a28 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -166,9 +166,18 @@ class Task(models.Model):
166 def get_related_setscene(self): 166 def get_related_setscene(self):
167 return Task.objects.related_setscene(self) 167 return Task.objects.related_setscene(self)
168 168
169 def get_outcome_text(self):
170 return Task.TASK_OUTCOME[self.outcome + 1][1]
171
169 def get_outcome_help(self): 172 def get_outcome_help(self):
170 return Task.TASK_OUTCOME_HELP[self.outcome][1] 173 return Task.TASK_OUTCOME_HELP[self.outcome][1]
171 174
175 def get_sstate_text(self):
176 if self.sstate_result==Task.SSTATE_NA:
177 return ''
178 else:
179 return Task.SSTATE_RESULT[self.sstate_result][1]
180
172 def get_executed_display(self): 181 def get_executed_display(self):
173 if self.task_executed: 182 if self.task_executed:
174 return "Executed" 183 return "Executed"
@@ -200,6 +209,9 @@ class Task(models.Model):
200 message = models.CharField(max_length=240) 209 message = models.CharField(max_length=240)
201 logfile = models.FilePathField(max_length=255, blank=True) 210 logfile = models.FilePathField(max_length=255, blank=True)
202 211
212 outcome_text = property(get_outcome_text)
213 sstate_text = property(get_sstate_text)
214
203 class Meta: 215 class Meta:
204 ordering = ('order', 'recipe' ,) 216 ordering = ('order', 'recipe' ,)
205 unique_together = ('build', 'recipe', 'task_name', ) 217 unique_together = ('build', 'recipe', 'task_name', )