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:49 +0100
commit3d11229aa14c0a034acc9e1ae040d80eeca9edd1 (patch)
tree15328f0d561c428fc80f64b6cf11f475ac784213 /bitbake/lib/toaster/orm/models.py
parentc0db739f3525f935ecb5a32f3b2ff26df92ff252 (diff)
downloadpoky-3d11229aa14c0a034acc9e1ae040d80eeca9edd1.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: 7ac374adf1cc70173ff6cc492bc078bba1cf500b) 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 2669606e2e..88967a23f5 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -416,6 +416,7 @@ class Build(models.Model):
416 # to show build progress in mrb_section.html 416 # to show build progress in mrb_section.html
417 for build in recent_builds: 417 for build in recent_builds:
418 build.percentDone = build.completeper() 418 build.percentDone = build.completeper()
419 build.outcomeText = build.get_outcome_text()
419 420
420 return recent_builds 421 return recent_builds
421 422