summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/mrb_section.html
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-07-11 14:47:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:09:26 +0100
commitdd99cf957da5836dc9b48d200f15a66f0bbce245 (patch)
treee7b8b8fa6b88520aabd6f17bc41cc8410af66761 /bitbake/lib/toaster/toastergui/templates/mrb_section.html
parent952ffb3e1f4a00793e0c9c49bc0c8fb8729424c4 (diff)
downloadpoky-dd99cf957da5836dc9b48d200f15a66f0bbce245.tar.gz
bitbake: toaster: show progress of recipe parsing in recent builds area
Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] (Bitbake rev: f33d51d46d70e73e04e325807c1bc4eb68462f7b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/mrb_section.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html112
1 files changed, 72 insertions, 40 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index 302b4b0da4..880485d45f 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -26,7 +26,9 @@
26 <div class="row project-name"> 26 <div class="row project-name">
27 <div class="col-md-12"> 27 <div class="col-md-12">
28 <small> 28 <small>
29 <a class="alert-link text-uppercase" href={% project_url build.project %}>{{build.project.name}}</a> 29 <a class="alert-link text-uppercase" href="{% project_url build.project %}">
30 {{build.project.name}}
31 </a>
30 </small> 32 </small>
31 </div> 33 </div>
32 </div> 34 </div>
@@ -52,14 +54,18 @@
52 <%:targets_abbreviated%> 54 <%:targets_abbreviated%>
53 </span> 55 </span>
54 </a> 56 </a>
55 <%else%> 57 <%else targets_abbreviated !== ''%>
56 <span data-toggle="tooltip" data-role="targets-text" title="Recipes: <%:targets%>"> 58 <span data-toggle="tooltip" data-role="targets-text" title="Recipes: <%:targets%>">
57 <%:targets_abbreviated%> 59 <%:targets_abbreviated%>
58 </span> 60 </span>
61 <%else%>
62 ...targets not yet available...
59 <%/if%> 63 <%/if%>
60 </div> 64 </div>
61 65
62 <%if state == 'Queued'%> 66 <%if state == 'Parsing'%>
67 <%include tmpl='#parsing-recipes-build-template'/%>
68 <%else state == 'Queued'%>
63 <%include tmpl='#queued-build-template'/%> 69 <%include tmpl='#queued-build-template'/%>
64 <%else state == 'Succeeded' || state == 'Failed'%> 70 <%else state == 'Succeeded' || state == 'Failed'%>
65 <%include tmpl='#succeeded-or-failed-build-template'/%> 71 <%include tmpl='#succeeded-or-failed-build-template'/%>
@@ -75,21 +81,38 @@
75<!-- queued build --> 81<!-- queued build -->
76<script id="queued-build-template" type="text/x-jsrender"> 82<script id="queued-build-template" type="text/x-jsrender">
77 <div class="col-md-5"> 83 <div class="col-md-5">
84 <span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="This build is waiting for
85the build directory to become available"></span>
86
78 Build queued 87 Build queued
79 </div> 88 </div>
80 89
81 <div class="col-md-4"> 90 <div class="col-md-4">
82 <%if is_default_project_build%> 91 <!-- cancel button -->
83 <!-- no cancel icon --> 92 <%include tmpl='#cancel-template'/%>
84 <span class="glyphicon glyphicon-question-sign get-help get-help-blue pull-right" title="Builds in this project cannot be cancelled from Toaster: they can only be cancelled from the command line"></span> 93 </div>
85 <%else%> 94</script>
86 <!-- cancel button --> 95
87 <span class="cancel-build-btn pull-right alert-link" 96<!-- parsing recipes build -->
88 data-buildrequest-id="<%:id%>" data-request-url="<%:cancel_url%>"> 97<script id="parsing-recipes-build-template" type="text/x-jsrender">
89 <span class="glyphicon glyphicon-remove-circle"></span> 98 <!-- progress bar and parse completion percentage -->
90 Cancel 99 <div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
91 </span> 100 <!-- progress bar -->
92 <%/if%> 101 <div class="progress">
102 <div id="recipes-parsed-percentage-bar-<%:id%>"
103 style="width: <%:recipes_parsed_percentage%>%;"
104 class="progress-bar">
105 </div>
106 </div>
107 </div>
108
109 <div class="col-md-4 progress-info">
110 <!-- parse completion percentage -->
111 <span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="BitBake is parsing the layers required for your build"></span>
112
113 Parsing <span id="recipes-parsed-percentage-<%:id%>"><%:recipes_parsed_percentage%></span>% complete
114
115 <%include tmpl='#cancel-template'/%>
93 </div> 116 </div>
94</script> 117</script>
95 118
@@ -110,17 +133,9 @@
110 <!-- task completion percentage --> 133 <!-- task completion percentage -->
111 <span id="build-pc-done-<%:id%>"><%:tasks_complete_percentage%></span>% of 134 <span id="build-pc-done-<%:id%>"><%:tasks_complete_percentage%></span>% of
112 tasks complete 135 tasks complete
113 <%if is_default_project_build%> 136
114 <!-- no cancel icon --> 137 <!-- cancel button -->
115 <span class="glyphicon glyphicon-question-sign get-help get-help-blue pull-right" title="Builds in this project cannot be cancelled from Toaster: they can only be cancelled from the command line"></span> 138 <%include tmpl='#cancel-template'/%>
116 <%else%>
117 <!-- cancel button -->
118 <span class="cancel-build-btn pull-right alert-link"
119 data-buildrequest-id="<%:id%>" data-request-url="<%:cancel_url%>">
120 <span class="glyphicon glyphicon-remove-circle"></span>
121 Cancel
122 </span>
123 <%/if%>
124 </div> 139 </div>
125</script> 140</script>
126 141
@@ -162,19 +177,8 @@
162 <div class="col-md-3"> 177 <div class="col-md-3">
163 Build time: <a class="alert-link" href="<%:buildtime_url%>"><%:buildtime%></a> 178 Build time: <a class="alert-link" href="<%:buildtime_url%>"><%:buildtime%></a>
164 179
165 <%if is_default_project_build%> 180 <!-- rebuild button -->
166 <!-- info icon --> 181 <%include tmpl='#rebuild-template'/%>
167 <span class="pull-right glyphicon glyphicon-question-sign get-help <%if state == 'Success'%>get-help-green<%else state == 'Failed'%>get-help-red<%else%>get-help-blue<%/if%>"
168 title="Builds in this project cannot be started from Toaster: they are started from the command line">
169 </span>
170 <%else%>
171 <!-- rebuild button -->
172 <span class="rebuild-btn alert-link <%if state == 'Success'%>success<%else state == 'Failed'%>danger<%else%>info<%/if%> pull-right"
173 data-request-url="<%:rebuild_url%>" data-target='<%:build_targets_json%>'>
174 <span class="glyphicon glyphicon-repeat"></span>
175 Rebuild
176 </span>
177 <%/if%>
178 </div> 182 </div>
179</script> 183</script>
180 184
@@ -187,12 +191,40 @@
187 191
188 <!-- rebuild button --> 192 <!-- rebuild button -->
189 <div class="col-md-3"> 193 <div class="col-md-3">
190 <span class="info pull-right rebuild-btn alert-link" 194 <%include tmpl='#rebuild-template'/%>
195 </div>
196</script>
197
198<!-- rebuild button or no rebuild icon -->
199<script id="rebuild-template" type="text/x-jsrender">
200 <%if is_default_project_build%>
201 <!-- no rebuild info icon -->
202 <span class="pull-right glyphicon glyphicon-question-sign get-help <%if state == 'Success'%>get-help-green<%else state == 'Failed'%>get-help-red<%else%>get-help-blue<%/if%>"
203 title="Builds in this project cannot be started from Toaster: they are started from the command line">
204 </span>
205 <%else%>
206 <!-- rebuild button -->
207 <span class="rebuild-btn alert-link <%if state == 'Success'%>success<%else state == 'Failed'%>danger<%else%>info<%/if%> pull-right"
191 data-request-url="<%:rebuild_url%>" data-target='<%:build_targets_json%>'> 208 data-request-url="<%:rebuild_url%>" data-target='<%:build_targets_json%>'>
192 <span class="glyphicon glyphicon-repeat"></span> 209 <span class="glyphicon glyphicon-repeat"></span>
193 Rebuild 210 Rebuild
194 </span> 211 </span>
195 </div> 212 <%/if%>
213</script>
214
215<!-- cancel button or no cancel icon -->
216<script id="cancel-template" type="text/x-jsrender">
217 <%if is_default_project_build%>
218 <!-- no cancel icon -->
219 <span class="glyphicon glyphicon-question-sign get-help get-help-blue pull-right" title="Builds in this project cannot be cancelled from Toaster: they can only be cancelled from the command line"></span>
220 <%else%>
221 <!-- cancel button -->
222 <span class="cancel-build-btn pull-right alert-link"
223 data-buildrequest-id="<%:buildrequest_id%>" data-request-url="<%:cancel_url%>">
224 <span class="glyphicon glyphicon-remove-circle"></span>
225 Cancel
226 </span>
227 <%/if%>
196</script> 228</script>
197 229
198<script> 230<script>