summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/mrbsection.js15
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html29
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py4
3 files changed, 47 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
index 73d0935fa5..c0c5fa9589 100644
--- a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
+++ b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
@@ -61,6 +61,12 @@ function mrbSectionInit(ctx){
61 return (cached.recipes_parsed_percentage !== build.recipes_parsed_percentage); 61 return (cached.recipes_parsed_percentage !== build.recipes_parsed_percentage);
62 } 62 }
63 63
64 // returns true if the number of repos cloned/to clone changed
65 function cloneProgressChanged(build) {
66 var cached = getCached(build);
67 return (cached.repos_cloned_percentage !== build.repos_cloned_percentage);
68 }
69
64 function refreshMostRecentBuilds(){ 70 function refreshMostRecentBuilds(){
65 libtoaster.getMostRecentBuilds( 71 libtoaster.getMostRecentBuilds(
66 libtoaster.ctx.mostRecentBuildsUrl, 72 libtoaster.ctx.mostRecentBuildsUrl,
@@ -100,6 +106,15 @@ function mrbSectionInit(ctx){
100 106
101 container.html(html); 107 container.html(html);
102 } 108 }
109 else if (cloneProgressChanged(build)) {
110 // update the clone progress text
111 selector = '#repos-cloned-percentage-' + build.id;
112 $(selector).html(build.repos_cloned_percentage);
113
114 // update the recipe progress bar
115 selector = '#repos-cloned-percentage-bar-' + build.id;
116 $(selector).width(build.repos_cloned_percentage + '%');
117 }
103 else if (tasksProgressChanged(build)) { 118 else if (tasksProgressChanged(build)) {
104 // update the task progress text 119 // update the task progress text
105 selector = '#build-pc-done-' + build.id; 120 selector = '#build-pc-done-' + build.id;
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index b761ffe1df..c5b9fe90d3 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -64,7 +64,9 @@
64 </div> 64 </div>
65 65
66 <div data-build-state="<%:state%>"> 66 <div data-build-state="<%:state%>">
67 <%if state == 'Parsing'%> 67 <%if state == 'Cloning'%>
68 <%include tmpl='#cloning-repos-build-template'/%>
69 <%else state == 'Parsing'%>
68 <%include tmpl='#parsing-recipes-build-template'/%> 70 <%include tmpl='#parsing-recipes-build-template'/%>
69 <%else state == 'Queued'%> 71 <%else state == 'Queued'%>
70 <%include tmpl='#queued-build-template'/%> 72 <%include tmpl='#queued-build-template'/%>
@@ -98,6 +100,31 @@
98 </div> 100 </div>
99</script> 101</script>
100 102
103<!-- cloning repos build -->
104<script id="cloning-repos-build-template" type="text/x-jsrender">
105 <!-- progress bar and parse completion percentage -->
106 <div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
107 <!-- progress bar -->
108 <div class="progress">
109 <div id="repos-cloned-percentage-bar-<%:id%>"
110 style="width: <%:repos_cloned_percentage%>%;"
111 class="progress-bar">
112 </div>
113 </div>
114 </div>
115
116 <div class="col-md-4 progress-info">
117 <!-- parse completion percentage -->
118 <span class="glyphicon glyphicon-question-sign get-help get-help-blue"
119 title="Toaster is cloning the repos required for your build">
120 </span>
121
122 Cloning <span id="repos-cloned-percentage-<%:id%>"><%:repos_cloned_percentage%></span>% complete
123
124 <%include tmpl='#cancel-template'/%>
125 </div>
126</script>
127
101<!-- parsing recipes build --> 128<!-- parsing recipes build -->
102<script id="parsing-recipes-build-template" type="text/x-jsrender"> 129<script id="parsing-recipes-build-template" type="text/x-jsrender">
103 <!-- progress bar and parse completion percentage --> 130 <!-- progress bar and parse completion percentage -->
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py
index 6b7b981f3b..67c1ff9615 100644
--- a/bitbake/lib/toaster/toastergui/widgets.py
+++ b/bitbake/lib/toaster/toastergui/widgets.py
@@ -511,6 +511,10 @@ class MostRecentBuildsView(View):
511 int((build_obj.recipes_parsed / 511 int((build_obj.recipes_parsed /
512 build_obj.recipes_to_parse) * 100) 512 build_obj.recipes_to_parse) * 100)
513 513
514 build['repos_cloned_percentage'] = \
515 int((build_obj.repos_cloned /
516 build_obj.repos_to_clone) * 100)
517
514 tasks_complete_percentage = 0 518 tasks_complete_percentage = 0
515 if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED): 519 if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):
516 tasks_complete_percentage = 100 520 tasks_complete_percentage = 100