[oe-commits] [bitbake] branch 1.30 updated: toaster: fix progress bar in MySQL environment
git at git.openembedded.org
git at git.openembedded.org
Fri May 13 16:46:58 UTC 2016
rpurdie pushed a commit to branch 1.30
in repository bitbake.
The following commit(s) were added to refs/heads/1.30 by this push:
new 9ea7d3e toaster: fix progress bar in MySQL environment
9ea7d3e is described below
commit 9ea7d3ec59c2b09ae60cf0c7f18472355bfb98d7
Author: Elliot Smith <elliot.smith at intel.com>
AuthorDate: Fri May 13 17:02:58 2016 +0100
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]
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/orm/models.py | 1 +
lib/toaster/toastergui/static/js/mrbsection.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 0b83b99..dbdd060 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -415,6 +415,7 @@ class Build(models.Model):
# to show build progress in mrb_section.html
for build in recent_builds:
build.percentDone = build.completeper()
+ build.outcomeText = build.get_outcome_text()
return recent_builds
diff --git a/lib/toaster/toastergui/static/js/mrbsection.js b/lib/toaster/toastergui/static/js/mrbsection.js
index 09117e1..9a76ee6 100644
--- a/lib/toaster/toastergui/static/js/mrbsection.js
+++ b/lib/toaster/toastergui/static/js/mrbsection.js
@@ -57,12 +57,12 @@ function mrbSectionInit(ctx){
for (var i in prjInfo.builds){
var build = prjInfo.builds[i];
- if (build.outcome === "In Progress" ||
+ if (build.outcomeText === "In Progress" ||
$(".progress .bar").length > 0){
/* Update the build progress */
var percentDone;
- if (build.outcome !== "In Progress"){
+ if (build.outcomeText !== "In Progress"){
/* We have to ignore the value when it's Succeeded because it
* goes back to 0
*/
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list