diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-13 14:42:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-11 00:09:26 +0100 |
commit | 2d80b902b804bc5927afbec2ad215f8959d0f581 (patch) | |
tree | 3d282de3198c544219c0b17db0a9e6641c0253be /bitbake | |
parent | e387a7ab9d46535a495bc7052915021dc914205d (diff) | |
download | poky-2d80b902b804bc5927afbec2ad215f8959d0f581.tar.gz |
bitbake: toaster: adjust build dashboard for failed builds
Remove the side bar and build details modules for failed builds.
[YOCTO #8443]
(Bitbake rev: 9d68a5bfdccd399791e1af048fefa73b5df90bcb)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 176 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/builddashboard.html | 147 |
2 files changed, 164 insertions, 159 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index 44749bf49a..50658e0c51 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html | |||
@@ -52,104 +52,106 @@ | |||
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | 54 | ||
55 | <div class="row"> | 55 | <!-- begin left sidebar container for builds which started properly --> |
56 | <!-- begin left sidebar container --> | 56 | {% if build.started %} |
57 | <div id="nav" class="col-md-2"> | 57 | <div class="row"> |
58 | <ul class="nav nav-pills nav-stacked" id="build-menu"> | 58 | <div id="nav" class="col-md-2"> |
59 | <li | 59 | <ul class="nav nav-pills nav-stacked" id="build-menu"> |
60 | {% if request.resolver_match.url_name == 'builddashboard' %} | 60 | <li |
61 | class="active" | 61 | {% if request.resolver_match.url_name == 'builddashboard' %} |
62 | {% endif %} > | 62 | class="active" |
63 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> | 63 | {% endif %} > |
64 | </li> | 64 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> |
65 | {% if build.has_images and build.outcome == build.SUCCEEDED %} | 65 | </li> |
66 | <li class="nav-header" data-menu-heading="images">Images</li> | 66 | {% if build.has_images and build.outcome == build.SUCCEEDED %} |
67 | {% block nav-target %} | 67 | <li class="nav-header" data-menu-heading="images">Images</li> |
68 | {% for t in build.get_sorted_target_list %} | 68 | {% block nav-target %} |
69 | {% if t.has_images %} | 69 | {% for t in build.get_sorted_target_list %} |
70 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | 70 | {% if t.has_images %} |
71 | {% endif %} | 71 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> |
72 | {% endfor %} | 72 | {% endif %} |
73 | {% endblock %} | 73 | {% endfor %} |
74 | {% endif %} | 74 | {% endblock %} |
75 | <li class="nav-header">Build</li> | 75 | {% endif %} |
76 | <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li> | 76 | <li class="nav-header">Build</li> |
77 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> | 77 | <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li> |
78 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> | 78 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> |
79 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> | 79 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> |
80 | <li class="nav-header">Performance</li> | 80 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> |
81 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> | 81 | <li class="nav-header">Performance</li> |
82 | <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> | 82 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> |
83 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | 83 | <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> |
84 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | ||
84 | 85 | ||
85 | <li class="nav-header">Actions</li> | 86 | <li class="nav-header">Actions</li> |
86 | <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">Download build log</a> | 87 | <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">Download build log</a> |
87 | 88 | ||
88 | {% with build.get_custom_image_recipes as custom_image_recipes %} | 89 | {% with build.get_custom_image_recipes as custom_image_recipes %} |
89 | {% if custom_image_recipes.count > 0 %} | 90 | {% if custom_image_recipes.count > 0 %} |
90 | <!-- edit custom image built during this build --> | 91 | <!-- edit custom image built during this build --> |
91 | <button class="btn btn-default btn-block navbar-btn" data-role="edit-custom-image-trigger">Edit custom image</button> | 92 | <button class="btn btn-default btn-block navbar-btn" data-role="edit-custom-image-trigger">Edit custom image</button> |
92 | {% include 'editcustomimage_modal.html' %} | 93 | {% include 'editcustomimage_modal.html' %} |
93 | <script> | 94 | <script> |
94 | var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }}; | 95 | var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }}; |
95 | 96 | ||
96 | $(document).ready(function () { | 97 | $(document).ready(function () { |
97 | var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]'); | 98 | var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]'); |
98 | var editCustomImageModal = $('#edit-custom-image-modal'); | 99 | var editCustomImageModal = $('#edit-custom-image-modal'); |
99 | 100 | ||
100 | // edit custom image which was built during this build | 101 | // edit custom image which was built during this build |
101 | editCustomImageTrigger.click(function () { | 102 | editCustomImageTrigger.click(function () { |
102 | // single editable custom image: redirect to the edit page | 103 | // single editable custom image: redirect to the edit page |
103 | // for that image | 104 | // for that image |
104 | if (editableCustomImageRecipes.length === 1) { | 105 | if (editableCustomImageRecipes.length === 1) { |
105 | var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}'; | 106 | var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}'; |
106 | document.location.href = url; | 107 | document.location.href = url; |
107 | } | 108 | } |
108 | // multiple editable custom images: show modal to select | 109 | // multiple editable custom images: show modal to select |
109 | // one of them for editing | 110 | // one of them for editing |
110 | else { | 111 | else { |
111 | editCustomImageModal.modal('show'); | 112 | editCustomImageModal.modal('show'); |
112 | } | 113 | } |
114 | }); | ||
113 | }); | 115 | }); |
114 | }); | 116 | </script> |
115 | </script> | 117 | {% endif %} |
116 | {% endif %} | 118 | {% endwith %} |
117 | {% endwith %} | ||
118 | 119 | ||
119 | <!-- new custom image from image recipe in this build --> | 120 | <!-- new custom image from image recipe in this build --> |
120 | {% if build.has_image_recipes %} | 121 | {% if build.has_image_recipes %} |
121 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> | 122 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> |
122 | {% include 'newcustomimage_modal.html' %} | 123 | {% include 'newcustomimage_modal.html' %} |
123 | <script> | 124 | <script> |
124 | // imageRecipes includes both custom image recipes and built-in | 125 | // imageRecipes includes both custom image recipes and built-in |
125 | // image recipes, any of which can be used as the basis for a | 126 | // image recipes, any of which can be used as the basis for a |
126 | // new custom image | 127 | // new custom image |
127 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; | 128 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; |
128 | 129 | ||
129 | $(document).ready(function () { | 130 | $(document).ready(function () { |
130 | var newCustomImageModal = $('#new-custom-image-modal'); | 131 | var newCustomImageModal = $('#new-custom-image-modal'); |
131 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); | 132 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); |
132 | 133 | ||
133 | // show create new custom image modal to select an image built | 134 | // show create new custom image modal to select an image built |
134 | // during this build as the basis for the custom recipe | 135 | // during this build as the basis for the custom recipe |
135 | newCustomImageTrigger.click(function () { | 136 | newCustomImageTrigger.click(function () { |
136 | if (!imageRecipes.length) { | 137 | if (!imageRecipes.length) { |
137 | return; | 138 | return; |
138 | } | 139 | } |
139 | 140 | ||
140 | newCustomImageModalSetRecipes(imageRecipes); | 141 | newCustomImageModalSetRecipes(imageRecipes); |
141 | newCustomImageModal.modal('show'); | 142 | newCustomImageModal.modal('show'); |
143 | }); | ||
142 | }); | 144 | }); |
143 | }); | 145 | </script> |
144 | </script> | 146 | {% endif %} |
145 | {% endif %} | 147 | </ul> |
146 | </ul> | 148 | </div> |
149 | <!-- end left sidebar container --> | ||
150 | {% endif %} | ||
147 | 151 | ||
152 | <!-- right container; need class="row" for builds without left-hand menu --> | ||
153 | <div{% if not build.started %} class="row"{% endif %}> | ||
154 | {% block buildinfomain %}{% endblock %} | ||
148 | </div> | 155 | </div> |
149 | <!-- end left sidebar container --> | ||
150 | |||
151 | <!-- begin right container --> | ||
152 | {% block buildinfomain %}{% endblock %} | ||
153 | <!-- end right container --> | ||
154 | </div> | 156 | </div> |
155 | {% endblock %} | 157 | {% endblock %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index 61ae583d23..9e6e1c172b 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | {% block buildinfomain %} | 15 | {% block buildinfomain %} |
16 | <!-- page title --> | 16 | <!-- page title --> |
17 | <div class="col-md-10"> | 17 | <div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}"> |
18 | <div class="page-header build-data"> | 18 | <div class="page-header build-data"> |
19 | <h1>{{build.get_sorted_target_list|field_values:"target"|join:", "}} {{build.machine}}</h1> | 19 | <h1>{{build.get_sorted_target_list|field_values:"target"|join:", "}} {{build.machine}}</h1> |
20 | </div> | 20 | </div> |
@@ -62,9 +62,9 @@ | |||
62 | </div> | 62 | </div> |
63 | <div class="panel-collapse collapse in" id="error-info"> | 63 | <div class="panel-collapse collapse in" id="error-info"> |
64 | <div class="panel-body"> | 64 | <div class="panel-body"> |
65 | <div class="col-md-10"> | 65 | <div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}"> |
66 | {% for error in build.errors %} | 66 | {% for error in build.errors %} |
67 | <div class="alert alert-danger" data-error="{{ error.id }}"> | 67 | <div class="alert alert-danger" data-log-message-id="{{error.pk}}"> |
68 | <pre>{{error.message}}</pre> | 68 | <pre>{{error.message}}</pre> |
69 | </div> | 69 | </div> |
70 | {% endfor %} | 70 | {% endfor %} |
@@ -201,79 +201,82 @@ | |||
201 | </div> | 201 | </div> |
202 | 202 | ||
203 | {% endif %} | 203 | {% endif %} |
204 | <!-- build summary --> | 204 | |
205 | <h2>Build summary</h2> | 205 | {% if build.started %} |
206 | <div class="row"> | 206 | <!-- build summary --> |
207 | <div class="col-md-4 dashboard-section"> | 207 | <h2 data-role="build-summary-heading">Build summary</h2> |
208 | <div class="well well-transparent"> | 208 | <div class="row"> |
209 | <h3><a href="{%url 'configuration' build.pk%}">Configuration</a></h3> | 209 | <div class="col-md-4 dashboard-section"> |
210 | <dl> | 210 | <div class="well well-transparent"> |
211 | <dt>Machine</dt><dd>{{build.machine}}</dd> | 211 | <h3><a href="{%url 'configuration' build.pk%}">Configuration</a></h3> |
212 | <dt>Distro</dt><dd>{{build.distro}}</dd> | 212 | <dl> |
213 | <dt>Layers</dt><dd><ul class="list-unstyled">{% for i in build.layer_version_build.all|dictsort:"layer.name" %}<li>{{i.layer.name}}</li>{%endfor%}</ul></dd> | 213 | <dt>Machine</dt><dd>{{build.machine}}</dd> |
214 | </dl> | 214 | <dt>Distro</dt><dd>{{build.distro}}</dd> |
215 | <dt>Layers</dt><dd><ul class="list-unstyled">{% for i in build.layer_version_build.all|dictsort:"layer.name" %}<li>{{i.layer.name}}</li>{%endfor%}</ul></dd> | ||
216 | </dl> | ||
217 | </div> | ||
215 | </div> | 218 | </div> |
216 | </div> | 219 | <div class="col-md-4 dashboard-section"> |
217 | <div class="col-md-4 dashboard-section"> | 220 | <div class="well well-transparent"> |
218 | <div class="well well-transparent"> | 221 | <h3><a href="{%url 'tasks' build.pk%}">Tasks</a></h3> |
219 | <h3><a href="{%url 'tasks' build.pk%}">Tasks</a></h3> | 222 | <dl> |
220 | <dl> | 223 | {% query build.task_build outcome=4 order__gt=0 as exectask%} |
221 | {% query build.task_build outcome=4 order__gt=0 as exectask%} | 224 | {% if exectask.count > 0 %} |
222 | {% if exectask.count > 0 %} | 225 | <dt>Failed tasks</dt> |
223 | <dt>Failed tasks</dt> | 226 | <dd> |
224 | <dd> | 227 | {% if exectask.count == 1 %} |
225 | {% if exectask.count == 1 %} | 228 | <a class="text-danger" href="{% url "task" build.id exectask.0.id %}"> |
226 | <a class="text-danger" href="{% url "task" build.id exectask.0.id %}"> | 229 | {{exectask.0.recipe.name}} |
227 | {{exectask.0.recipe.name}} | 230 | <span class="task-name">{{exectask.0.task_name}}</span> |
228 | <span class="task-name">{{exectask.0.task_name}}</span> | 231 | </a> |
229 | </a> | ||
230 | 232 | ||
231 | <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}"> | 233 | <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}"> |
232 | <span class="glyphicon glyphicon-download-alt get-help" title="Download task log file"></i> | 234 | <span class="glyphicon glyphicon-download-alt get-help" title="Download task log file"></i> |
233 | </a> | 235 | </a> |
234 | 236 | ||
235 | {% elif exectask.count > 1%} | 237 | {% elif exectask.count > 1%} |
236 | <a class="text-danger" href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a> | 238 | <a class="text-danger" href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a> |
237 | {% endif %} | 239 | {% endif %} |
238 | </dd> | 240 | </dd> |
239 | {% endif %} | 241 | {% endif %} |
240 | <dt>Total number of tasks</dt><dd><a href="{% url 'tasks' build.pk %}">{% query build.task_build order__gt=0 as alltasks %}{{alltasks.count}}</a></dd> | 242 | <dt>Total number of tasks</dt><dd><a href="{% url 'tasks' build.pk %}">{% query build.task_build order__gt=0 as alltasks %}{{alltasks.count}}</a></dd> |
241 | <dt> | 243 | <dt> |
242 | Tasks executed | 244 | Tasks executed |
243 | <span class="glyphicon glyphicon-question-sign get-help" title="'Executed' tasks are those that need to be run in order to generate the task output"></span> | 245 | <span class="glyphicon glyphicon-question-sign get-help" title="'Executed' tasks are those that need to be run in order to generate the task output"></span> |
244 | </dt> | 246 | </dt> |
245 | <dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A1&count=25&search=&page=1&orderby=order%3A%2B">{% query build.task_build task_executed=1 order__gt=0 as exectask%}{{exectask.count}}</a></dd> | 247 | <dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A1&count=25&search=&page=1&orderby=order%3A%2B">{% query build.task_build task_executed=1 order__gt=0 as exectask%}{{exectask.count}}</a></dd> |
246 | <dt> | 248 | <dt> |
247 | Tasks not executed | 249 | Tasks not executed |
248 | <span class="glyphicon glyphicon-question-sign get-help" title="'Not executed' tasks don't need to run because their outcome is provided by another task"></span> | 250 | <span class="glyphicon glyphicon-question-sign get-help" title="'Not executed' tasks don't need to run because their outcome is provided by another task"></span> |
249 | </dt> | 251 | </dt> |
250 | <dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A0&count=25&search=&page=1&orderby=order%3A%2B">{% query build.task_build task_executed=0 order__gt=0 as noexectask%}{{noexectask.count}}</a></dd> | 252 | <dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A0&count=25&search=&page=1&orderby=order%3A%2B">{% query build.task_build task_executed=0 order__gt=0 as noexectask%}{{noexectask.count}}</a></dd> |
251 | <dt> | 253 | <dt> |
252 | Reuse | 254 | Reuse |
253 | <span class="glyphicon glyphicon-question-sign get-help" title="The percentage of 'not executed' tasks over the total number of tasks, which is a measure of the efficiency of your build"></span> | 255 | <span class="glyphicon glyphicon-question-sign get-help" title="The percentage of 'not executed' tasks over the total number of tasks, which is a measure of the efficiency of your build"></span> |
254 | </dt> | 256 | </dt> |
255 | <dd> | 257 | <dd> |
256 | {% query build.task_build order__gt=0 as texec %} | 258 | {% query build.task_build order__gt=0 as texec %} |
257 | {% if noexectask.count|multiply:100|divide:texec.count < 0 %} | 259 | {% if noexectask.count|multiply:100|divide:texec.count < 0 %} |
258 | 0 | 260 | 0 |
259 | {% else %} | 261 | {% else %} |
260 | {{noexectask.count|multiply:100|divide:texec.count}} | 262 | {{noexectask.count|multiply:100|divide:texec.count}} |
261 | {% endif %} | 263 | {% endif %} |
262 | % | 264 | % |
263 | </dd> | 265 | </dd> |
264 | </dl> | 266 | </dl> |
267 | </div> | ||
268 | </div> | ||
269 | <div class="col-md-4 dashboard-section"> | ||
270 | <div class="well well-transparent"> | ||
271 | <h3><a href="{% url 'recipes' build.pk %}">Recipes</a> & <a href="{% url 'packages' build.pk %}">Packages</a></h3> | ||
272 | <dl> | ||
273 | <dt>Recipes built</dt><dd><a href="{% url 'recipes' build.pk %}">{{recipecount}}</a></dd> | ||
274 | <dt>Packages built</dt><dd><a href="{% url 'packages' build.pk %}">{{packagecount}}</a></dd> | ||
275 | </dl> | ||
265 | </div> | 276 | </div> |
266 | </div> | ||
267 | <div class="col-md-4 dashboard-section"> | ||
268 | <div class="well well-transparent"> | ||
269 | <h3><a href="{% url 'recipes' build.pk %}">Recipes</a> & <a href="{% url 'packages' build.pk %}">Packages</a></h3> | ||
270 | <dl> | ||
271 | <dt>Recipes built</dt><dd><a href="{% url 'recipes' build.pk %}">{{recipecount}}</a></dd> | ||
272 | <dt>Packages built</dt><dd><a href="{% url 'packages' build.pk %}">{{packagecount}}</a></dd> | ||
273 | </dl> | ||
274 | </div> | 277 | </div> |
275 | </div> | 278 | </div> |
276 | </div> | 279 | {% endif %} <!-- end build summary --> |
277 | 280 | ||
278 | {% if build.warnings.count %} | 281 | {% if build.warnings.count %} |
279 | <div class="panel panel-default" id="warnings"> | 282 | <div class="panel panel-default" id="warnings"> |
@@ -285,9 +288,9 @@ | |||
285 | </div> | 288 | </div> |
286 | <div class="panel-collapse collapse" id="warning-info"> | 289 | <div class="panel-collapse collapse" id="warning-info"> |
287 | <div class="panel-body"> | 290 | <div class="panel-body"> |
288 | <div class="col-md-10"> | 291 | <div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}"> |
289 | {% for warning in logmessages %}{% if warning.level == 1 %} | 292 | {% for warning in logmessages %}{% if warning.level == 1 %} |
290 | <div class="alert alert-warning"> | 293 | <div class="alert alert-warning" data-log-message-id="{{warning.pk}}"> |
291 | <pre>{{warning.message}}</pre> | 294 | <pre>{{warning.message}}</pre> |
292 | </div> | 295 | </div> |
293 | {% endif %}{% endfor %} | 296 | {% endif %}{% endfor %} |