[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1810/8267] bitbake: toaster: adjust build dashboard for failed builds
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1810/8267] bitbake: toaster: adjust build dashboard for failed builds
- Date: Sat, 16 Dec 2017 22:20:56 +0000 (UTC)
commit 2d80b902b804bc5927afbec2ad215f8959d0f581
Author: Elliot Smith <elliot smith intel com>
Date: Wed Jul 13 14:42:31 2016 +0100
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>
.../toastergui/templates/basebuildpage.html | 176 ++++++++++----------
.../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 44749bf..50658e0 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -52,104 +52,106 @@
</div>
</div>
- <div class="row">
- <!-- begin left sidebar container -->
- <div id="nav" class="col-md-2">
- <ul class="nav nav-pills nav-stacked" id="build-menu">
- <li
- {% if request.resolver_match.url_name == 'builddashboard' %}
- class="active"
- {% endif %} >
- <a href="{% url 'builddashboard' build.pk %}">Build summary</a>
- </li>
- {% if build.has_images and build.outcome == build.SUCCEEDED %}
- <li class="nav-header" data-menu-heading="images">Images</li>
- {% block nav-target %}
- {% for t in build.get_sorted_target_list %}
- {% if t.has_images %}
- <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
- {% endif %}
- {% endfor %}
- {% endblock %}
- {% endif %}
- <li class="nav-header">Build</li>
- <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
- <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
- <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
- <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
- <li class="nav-header">Performance</li>
- <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
- <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
- <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
+ <!-- begin left sidebar container for builds which started properly -->
+ {% if build.started %}
+ <div class="row">
+ <div id="nav" class="col-md-2">
+ <ul class="nav nav-pills nav-stacked" id="build-menu">
+ <li
+ {% if request.resolver_match.url_name == 'builddashboard' %}
+ class="active"
+ {% endif %} >
+ <a href="{% url 'builddashboard' build.pk %}">Build summary</a>
+ </li>
+ {% if build.has_images and build.outcome == build.SUCCEEDED %}
+ <li class="nav-header" data-menu-heading="images">Images</li>
+ {% block nav-target %}
+ {% for t in build.get_sorted_target_list %}
+ {% if t.has_images %}
+ <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
+ {% endif %}
+ {% endfor %}
+ {% endblock %}
+ {% endif %}
+ <li class="nav-header">Build</li>
+ <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
+ <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
+ <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
+ <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
+ <li class="nav-header">Performance</li>
+ <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
+ <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
+ <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
- <li class="nav-header">Actions</li>
- <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id
'cookerlog' build.id %}">Download build log</a>
+ <li class="nav-header">Actions</li>
+ <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id
'cookerlog' build.id %}">Download build log</a>
- {% with build.get_custom_image_recipes as custom_image_recipes %}
- {% if custom_image_recipes.count > 0 %}
- <!-- edit custom image built during this build -->
- <button class="btn btn-default btn-block navbar-btn"
data-role="edit-custom-image-trigger">Edit custom image</button>
- {% include 'editcustomimage_modal.html' %}
- <script>
- var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name"
| json }};
+ {% with build.get_custom_image_recipes as custom_image_recipes %}
+ {% if custom_image_recipes.count > 0 %}
+ <!-- edit custom image built during this build -->
+ <button class="btn btn-default btn-block navbar-btn"
data-role="edit-custom-image-trigger">Edit custom image</button>
+ {% include 'editcustomimage_modal.html' %}
+ <script>
+ var editableCustomImageRecipes = {{ custom_image_recipes |
objects_to_dictionaries:"id,name" | json }};
- $(document).ready(function () {
- var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]');
- var editCustomImageModal = $('#edit-custom-image-modal');
+ $(document).ready(function () {
+ var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]');
+ var editCustomImageModal = $('#edit-custom-image-modal');
- // edit custom image which was built during this build
- editCustomImageTrigger.click(function () {
- // single editable custom image: redirect to the edit page
- // for that image
- if (editableCustomImageRecipes.length === 1) {
- var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}';
- document.location.href = url;
- }
- // multiple editable custom images: show modal to select
- // one of them for editing
- else {
- editCustomImageModal.modal('show');
- }
+ // edit custom image which was built during this build
+ editCustomImageTrigger.click(function () {
+ // single editable custom image: redirect to the edit page
+ // for that image
+ if (editableCustomImageRecipes.length === 1) {
+ var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}';
+ document.location.href = url;
+ }
+ // multiple editable custom images: show modal to select
+ // one of them for editing
+ else {
+ editCustomImageModal.modal('show');
+ }
+ });
});
- });
- </script>
- {% endif %}
- {% endwith %}
+ </script>
+ {% endif %}
+ {% endwith %}
- <!-- new custom image from image recipe in this build -->
- {% if build.has_image_recipes %}
- <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New
custom image</button>
- {% include 'newcustomimage_modal.html' %}
- <script>
- // imageRecipes includes both custom image recipes and built-in
- // image recipes, any of which can be used as the basis for a
- // new custom image
- var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }};
+ <!-- new custom image from image recipe in this build -->
+ {% if build.has_image_recipes %}
+ <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New
custom image</button>
+ {% include 'newcustomimage_modal.html' %}
+ <script>
+ // imageRecipes includes both custom image recipes and built-in
+ // image recipes, any of which can be used as the basis for a
+ // new custom image
+ var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }};
- $(document).ready(function () {
- var newCustomImageModal = $('#new-custom-image-modal');
- var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]');
+ $(document).ready(function () {
+ var newCustomImageModal = $('#new-custom-image-modal');
+ var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]');
- // show create new custom image modal to select an image built
- // during this build as the basis for the custom recipe
- newCustomImageTrigger.click(function () {
- if (!imageRecipes.length) {
- return;
- }
+ // show create new custom image modal to select an image built
+ // during this build as the basis for the custom recipe
+ newCustomImageTrigger.click(function () {
+ if (!imageRecipes.length) {
+ return;
+ }
- newCustomImageModalSetRecipes(imageRecipes);
- newCustomImageModal.modal('show');
+ newCustomImageModalSetRecipes(imageRecipes);
+ newCustomImageModal.modal('show');
+ });
});
- });
- </script>
- {% endif %}
- </ul>
+ </script>
+ {% endif %}
+ </ul>
+ </div>
+ <!-- end left sidebar container -->
+ {% endif %}
+ <!-- right container; need class="row" for builds without left-hand menu -->
+ <div{% if not build.started %} class="row"{% endif %}>
+ {% block buildinfomain %}{% endblock %}
</div>
- <!-- end left sidebar container -->
-
- <!-- begin right container -->
- {% block buildinfomain %}{% endblock %}
- <!-- end right container -->
</div>
{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index 61ae583..9e6e1c1 100644
--- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -14,7 +14,7 @@
{% block buildinfomain %}
<!-- page title -->
-<div class="col-md-10">
+<div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}">
<div class="page-header build-data">
<h1>{{build.get_sorted_target_list|field_values:"target"|join:", "}} {{build.machine}}</h1>
</div>
@@ -62,9 +62,9 @@
</div>
<div class="panel-collapse collapse in" id="error-info">
<div class="panel-body">
- <div class="col-md-10">
+ <div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}">
{% for error in build.errors %}
- <div class="alert alert-danger" data-error="{{ error.id }}">
+ <div class="alert alert-danger" data-log-message-id="{{error.pk}}">
<pre>{{error.message}}</pre>
</div>
{% endfor %}
@@ -201,79 +201,82 @@
</div>
{% endif %}
-<!-- build summary -->
-<h2>Build summary</h2>
- <div class="row">
- <div class="col-md-4 dashboard-section">
- <div class="well well-transparent">
- <h3><a href="{%url 'configuration' build.pk%}">Configuration</a></h3>
- <dl>
- <dt>Machine</dt><dd>{{build.machine}}</dd>
- <dt>Distro</dt><dd>{{build.distro}}</dd>
- <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>
- </dl>
+
+{% if build.started %}
+ <!-- build summary -->
+ <h2 data-role="build-summary-heading">Build summary</h2>
+ <div class="row">
+ <div class="col-md-4 dashboard-section">
+ <div class="well well-transparent">
+ <h3><a href="{%url 'configuration' build.pk%}">Configuration</a></h3>
+ <dl>
+ <dt>Machine</dt><dd>{{build.machine}}</dd>
+ <dt>Distro</dt><dd>{{build.distro}}</dd>
+ <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>
+ </dl>
+ </div>
</div>
- </div>
- <div class="col-md-4 dashboard-section">
- <div class="well well-transparent">
- <h3><a href="{%url 'tasks' build.pk%}">Tasks</a></h3>
- <dl>
- {% query build.task_build outcome=4 order__gt=0 as exectask%}
- {% if exectask.count > 0 %}
- <dt>Failed tasks</dt>
- <dd>
- {% if exectask.count == 1 %}
- <a class="text-danger" href="{% url "task" build.id exectask.0.id %}">
- {{exectask.0.recipe.name}}
- <span class="task-name">{{exectask.0.task_name}}</span>
- </a>
+ <div class="col-md-4 dashboard-section">
+ <div class="well well-transparent">
+ <h3><a href="{%url 'tasks' build.pk%}">Tasks</a></h3>
+ <dl>
+ {% query build.task_build outcome=4 order__gt=0 as exectask%}
+ {% if exectask.count > 0 %}
+ <dt>Failed tasks</dt>
+ <dd>
+ {% if exectask.count == 1 %}
+ <a class="text-danger" href="{% url "task" build.id exectask.0.id %}">
+ {{exectask.0.recipe.name}}
+ <span class="task-name">{{exectask.0.task_name}}</span>
+ </a>
- <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
- <span class="glyphicon glyphicon-download-alt get-help" title="Download task log
file"></i>
- </a>
+ <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
+ <span class="glyphicon glyphicon-download-alt get-help" title="Download task
log file"></i>
+ </a>
- {% elif exectask.count > 1%}
- <a class="text-danger" href="{% url "tasks" build.id
%}?filter=outcome%3A4">{{exectask.count}}</a>
- {% endif %}
- </dd>
- {% endif %}
- <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>
- <dt>
- Tasks executed
- <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>
- </dt>
- <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>
- <dt>
- Tasks not executed
- <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>
- </dt>
- <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>
- <dt>
- Reuse
- <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>
- </dt>
- <dd>
-{% query build.task_build order__gt=0 as texec %}
-{% if noexectask.count|multiply:100|divide:texec.count < 0 %}
-0
-{% else %}
-{{noexectask.count|multiply:100|divide:texec.count}}
-{% endif %}
-%
- </dd>
- </dl>
+ {% elif exectask.count > 1%}
+ <a class="text-danger" href="{% url "tasks" build.id
%}?filter=outcome%3A4">{{exectask.count}}</a>
+ {% endif %}
+ </dd>
+ {% endif %}
+ <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>
+ <dt>
+ Tasks executed
+ <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>
+ </dt>
+ <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>
+ <dt>
+ Tasks not executed
+ <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>
+ </dt>
+ <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>
+ <dt>
+ Reuse
+ <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>
+ </dt>
+ <dd>
+ {% query build.task_build order__gt=0 as texec %}
+ {% if noexectask.count|multiply:100|divide:texec.count < 0 %}
+ 0
+ {% else %}
+ {{noexectask.count|multiply:100|divide:texec.count}}
+ {% endif %}
+ %
+ </dd>
+ </dl>
+ </div>
+ </div>
+ <div class="col-md-4 dashboard-section">
+ <div class="well well-transparent">
+ <h3><a href="{% url 'recipes' build.pk %}">Recipes</a> & <a href="{% url 'packages' build.pk
%}">Packages</a></h3>
+ <dl>
+ <dt>Recipes built</dt><dd><a href="{% url 'recipes' build.pk %}">{{recipecount}}</a></dd>
+ <dt>Packages built</dt><dd><a href="{% url 'packages' build.pk %}">{{packagecount}}</a></dd>
+ </dl>
</div>
- </div>
- <div class="col-md-4 dashboard-section">
- <div class="well well-transparent">
- <h3><a href="{% url 'recipes' build.pk %}">Recipes</a> & <a href="{% url 'packages' build.pk
%}">Packages</a></h3>
- <dl>
- <dt>Recipes built</dt><dd><a href="{% url 'recipes' build.pk %}">{{recipecount}}</a></dd>
- <dt>Packages built</dt><dd><a href="{% url 'packages' build.pk %}">{{packagecount}}</a></dd>
- </dl>
</div>
</div>
-</div>
+{% endif %} <!-- end build summary -->
{% if build.warnings.count %}
<div class="panel panel-default" id="warnings">
@@ -285,9 +288,9 @@
</div>
<div class="panel-collapse collapse" id="warning-info">
<div class="panel-body">
- <div class="col-md-10">
+ <div class="{% if build.started %}col-md-10{% else %}col-md-12{% endif %}">
{% for warning in logmessages %}{% if warning.level == 1 %}
- <div class="alert alert-warning">
+ <div class="alert alert-warning" data-log-message-id="{{warning.pk}}">
<pre>{{warning.message}}</pre>
</div>
{% endif %}{% endfor %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]