mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: toaster: git clone progress bar
If a project has a lot of additional layers, the build may appear to hang while those layers are checked out. This patch adds a clone progress bar that is visible before the parsing progress appears. [YOCTO #9916] (Bitbake rev: 0c94d947b74c4dee23d7b9d255facd3cf839ccbe) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d74bcbeaf2
commit
43aaa802c3
@@ -61,6 +61,12 @@ function mrbSectionInit(ctx){
|
||||
return (cached.recipes_parsed_percentage !== build.recipes_parsed_percentage);
|
||||
}
|
||||
|
||||
// returns true if the number of repos cloned/to clone changed
|
||||
function cloneProgressChanged(build) {
|
||||
var cached = getCached(build);
|
||||
return (cached.repos_cloned_percentage !== build.repos_cloned_percentage);
|
||||
}
|
||||
|
||||
function refreshMostRecentBuilds(){
|
||||
libtoaster.getMostRecentBuilds(
|
||||
libtoaster.ctx.mostRecentBuildsUrl,
|
||||
@@ -100,6 +106,15 @@ function mrbSectionInit(ctx){
|
||||
|
||||
container.html(html);
|
||||
}
|
||||
else if (cloneProgressChanged(build)) {
|
||||
// update the clone progress text
|
||||
selector = '#repos-cloned-percentage-' + build.id;
|
||||
$(selector).html(build.repos_cloned_percentage);
|
||||
|
||||
// update the recipe progress bar
|
||||
selector = '#repos-cloned-percentage-bar-' + build.id;
|
||||
$(selector).width(build.repos_cloned_percentage + '%');
|
||||
}
|
||||
else if (tasksProgressChanged(build)) {
|
||||
// update the task progress text
|
||||
selector = '#build-pc-done-' + build.id;
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
</div>
|
||||
|
||||
<div data-build-state="<%:state%>">
|
||||
<%if state == 'Parsing'%>
|
||||
<%if state == 'Cloning'%>
|
||||
<%include tmpl='#cloning-repos-build-template'/%>
|
||||
<%else state == 'Parsing'%>
|
||||
<%include tmpl='#parsing-recipes-build-template'/%>
|
||||
<%else state == 'Queued'%>
|
||||
<%include tmpl='#queued-build-template'/%>
|
||||
@@ -98,6 +100,31 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- cloning repos build -->
|
||||
<script id="cloning-repos-build-template" type="text/x-jsrender">
|
||||
<!-- progress bar and parse completion percentage -->
|
||||
<div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
|
||||
<!-- progress bar -->
|
||||
<div class="progress">
|
||||
<div id="repos-cloned-percentage-bar-<%:id%>"
|
||||
style="width: <%:repos_cloned_percentage%>%;"
|
||||
class="progress-bar">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 progress-info">
|
||||
<!-- parse completion percentage -->
|
||||
<span class="glyphicon glyphicon-question-sign get-help get-help-blue"
|
||||
title="Toaster is cloning the repos required for your build">
|
||||
</span>
|
||||
|
||||
Cloning <span id="repos-cloned-percentage-<%:id%>"><%:repos_cloned_percentage%></span>% complete
|
||||
|
||||
<%include tmpl='#cancel-template'/%>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- parsing recipes build -->
|
||||
<script id="parsing-recipes-build-template" type="text/x-jsrender">
|
||||
<!-- progress bar and parse completion percentage -->
|
||||
|
||||
@@ -511,6 +511,10 @@ class MostRecentBuildsView(View):
|
||||
int((build_obj.recipes_parsed /
|
||||
build_obj.recipes_to_parse) * 100)
|
||||
|
||||
build['repos_cloned_percentage'] = \
|
||||
int((build_obj.repos_cloned /
|
||||
build_obj.repos_to_clone) * 100)
|
||||
|
||||
tasks_complete_percentage = 0
|
||||
if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):
|
||||
tasks_complete_percentage = 100
|
||||
|
||||
Reference in New Issue
Block a user