diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-01-18 14:23:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 13:29:20 +0000 |
commit | efbffe3c298d57af34324639f2208e35735758a9 (patch) | |
tree | 211cb0601b9b1ed6fe6ad220cb03818080a3d725 /bitbake/lib/toaster/toastergui/templates | |
parent | b51478582f17bc9c43a92232e41246aec3e89f36 (diff) | |
download | poky-efbffe3c298d57af34324639f2208e35735758a9.tar.gz |
bitbake: toaster: move recent builds query to model
The progress updater for the recent builds section makes a JSON
call to the project view URL to get progress for each build.
However, conversion of the builds pages to ToasterTable broke this,
as the JSON response no longer contained the data necessary to
populate the progress bars.
Move the recent builds query to the Build model, so that it is
accessible to the ToasterTables using it ("project builds" and
"all builds"), as well as to the "project" view.
Modify the code in the recent builds template to use the slightly
different objects returned by the recent builds query on Build.
(Bitbake rev: 5189252635ddc7b90c9a43aaed9f196c31e1dcad)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 2e5eb5050b..da1253e1d5 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -165,7 +165,6 @@ $(document).ready(function(){ | |||
165 | progressTimer = window.setInterval(function() { | 165 | progressTimer = window.setInterval(function() { |
166 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, | 166 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, |
167 | function(prjInfo){ | 167 | function(prjInfo){ |
168 | |||
169 | /* These two are needed because a build can be 100% and still | 168 | /* These two are needed because a build can be 100% and still |
170 | * in progress due to the fact that the % done is updated at the | 169 | * in progress due to the fact that the % done is updated at the |
171 | * start of a task so it can be doing the last task at 100% | 170 | * start of a task so it can be doing the last task at 100% |
@@ -176,18 +175,18 @@ $(document).ready(function(){ | |||
176 | for (var i in prjInfo.builds){ | 175 | for (var i in prjInfo.builds){ |
177 | var build = prjInfo.builds[i]; | 176 | var build = prjInfo.builds[i]; |
178 | 177 | ||
179 | if (build.status === "In Progress" || | 178 | if (build.outcome === "In Progress" || |
180 | $(".progress .bar").length > 0){ | 179 | $(".progress .bar").length > 0){ |
181 | /* Update the build progress */ | 180 | /* Update the build progress */ |
182 | var percentDone; | 181 | var percentDone; |
183 | 182 | ||
184 | if (build.status !== "In Progress"){ | 183 | if (build.outcome !== "In Progress"){ |
185 | /* We have to ignore the value when it's Succeeded because it | 184 | /* We have to ignore the value when it's Succeeded because it |
186 | * goes back to 0 | 185 | * goes back to 0 |
187 | */ | 186 | */ |
188 | percentDone = 100; | 187 | percentDone = 100; |
189 | } else { | 188 | } else { |
190 | percentDone = build.build[0].completeper; | 189 | percentDone = build.percentDone; |
191 | inProgress++; | 190 | inProgress++; |
192 | } | 191 | } |
193 | 192 | ||