summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-05-13 17:02:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-13 17:45:58 +0100
commit75ca53211488a3e268037a44ee2a7ac5c7181bd2 (patch)
tree3e12719bd29fe1f5526183ce849790bc341a9359 /bitbake/lib/toaster/orm/models.py
parent898a78357e72fb80f1f8e26ba90bad5b7b054a4f (diff)
downloadpoky-75ca53211488a3e268037a44ee2a7ac5c7181bd2.tar.gz
bitbake: toaster: fix progress bar in MySQL environment
When using MySQL, the project builds info delivered by MySQL differs from that delivered by SQLite: the former returns text values from the enumeration for Build outcomes, while the latter returns the integer value. This causes the progress bar JS to break, as it is expecting outcome strings. Modify the recent_build() method to include an outcomeText property for each Build object, then use this in the conditionals in the progress bar JS. [YOCTO #9498] (Bitbake rev: 9ea7d3ec59c2b09ae60cf0c7f18472355bfb98d7) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 0b83b991b9..dbdd060986 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -415,6 +415,7 @@ class Build(models.Model):
415 # to show build progress in mrb_section.html 415 # to show build progress in mrb_section.html
416 for build in recent_builds: 416 for build in recent_builds:
417 build.percentDone = build.completeper() 417 build.percentDone = build.completeper()
418 build.outcomeText = build.get_outcome_text()
418 419
419 return recent_builds 420 return recent_builds
420 421