summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-23 17:36:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-29 22:11:35 +0000
commit4f7182775cfa39c589e2e4693b1769127d7dd4d4 (patch)
treef62dfeba0e4a021fcbcb64c05e873b9da3458921 /bitbake/lib/toaster/toastergui/templates
parentfefef50e5474da740f926ef635676c4d5f24b9b7 (diff)
downloadast2050-yocto-poky-4f7182775cfa39c589e2e4693b1769127d7dd4d4.zip
ast2050-yocto-poky-4f7182775cfa39c589e2e4693b1769127d7dd4d4.tar.gz
bitbake: toastergui: update project build listing
We update the build listings in the project mode to enable proper display and selection of build requests that do not have an actual build object because the bitbake process did not start. We add a page to display error details for build requests that did not start a build. Fixing errors and misspelling in build sections. Sorting by "timespent" is disabled for build-listing pages. [YOCTO #7165] [YOCTO #7156] [YOCTO #7196] [YOCTO #7188] (Bitbake rev: ee13bf45cecd6a0132d724b3206a6f4515669496) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html67
-rw-r--r--bitbake/lib/toaster/toastergui/templates/managed_builds.html18
-rw-r--r--bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html42
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectbuilds.html20
4 files changed, 116 insertions, 31 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
new file mode 100644
index 0000000..2a4571f
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
@@ -0,0 +1,67 @@
+{% extends "baseprojectpage.html" %}
+
+{% load static %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li> {{buildrequest.get_sorted_target_list.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} {{buildrequest.get_machine}} ({{buildrequest.updated|date:"d/m/y H:i"}}) </li>
+{% endblock %}
+
+{% block projectinfomain %}
+ <!-- begin content -->
+
+ <div class="row-fluid">
+
+ <!-- end left sidebar container -->
+ <!-- Begin right container -->
+ <div class="span10">
+ <div class="page-header">
+ <h1>
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} {{buildrequest.get_machine}} </span>
+
+ </h1>
+ </div>
+ <div class="alert alert-error">
+ <p class="lead">
+ <strong>Failed</strong>
+ on {{ buildrequest.updated|date:'d/m/y H:i' }}
+ with
+
+ <i class="icon-minus-sign error" style="margin-left:6px;"></i>
+ <strong><a class="error accordion-toggle toggle-errors" href="#errors">
+ {{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}
+ </a></strong>
+ <span class="pull-right">Build time: {{buildrequest.get_duration|sectohms}}</span>
+ </p>
+ </div>
+
+ <div class="accordion" id="errors" name="errors">
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle error toggle-errors">
+ <h2>
+ <i class="icon-minus-sign"></i>
+ {{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}
+ </h2>
+ </a>
+ </div>
+ <div class="accordion-body collapse in" id="collapse-errors">
+ <div class="accordion-inner">
+ <div class="span10">
+ {% for error in buildrequest.brerror_set.all %}
+ <div class="alert alert-error">
+ ERROR: <div class="air well"><pre>{{error.errmsg}}</pre></div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div> <!-- end of row-fluid -->
+
+
+{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html
index 5944dc4..183be76 100644
--- a/bitbake/lib/toaster/toastergui/templates/managed_builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/managed_builds.html
@@ -35,10 +35,10 @@
</div>
- {% else %}
+ {% else %} {# We have builds to display #}
{% include "basetable_top_buildprojects.html" %}
<!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
- {% for br in objects %}{% if br.build %} {% with build=br.build %} {# if we have a build, just display it #}
+ {% for buildrequest in objects %}{% if buildrequest.build %} {% with build=buildrequest.build %} {# if we have a build, just display it #}
<tr class="data">
<td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
<td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
@@ -61,7 +61,7 @@
<td class="errors_no">
{% if build.errors_no %}
<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
- {% if MANAGED and build.project %}
+ {% if MANAGED and build.project and build.buildartifact_set.count %}
<a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
<i class="icon-download-alt" title="" data-original-title="Download build log"></i>
</a>
@@ -96,21 +96,21 @@
<tr class="data">
<td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
<td class="target">
- <span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}"><span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
</td>
<td class="machine">
- {{br.machine}}
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a>
</td>
<td class="started_on">
- {{br.created|date:"d/m/y H:i"}}
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a>
</td>
<td class="completed_on">
- {{br.updated|date:"d/m/y H:i"}}
+ <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.updated|date:"d/m/y H:i"}}</a>
</td>
<td class="failed_tasks error">
- {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}}
</td>
<td class="errors_no">
+ <a class="errors_no error" href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}#errors">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a>
</td>
<td class="warnings_no">
</td>
@@ -120,7 +120,7 @@
<td class="output"> {# we have no output here #}
</td>
<td class="project">
- <a href="{% url 'project' br.project.id %}">{{br.project.name}}</a>
+ <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a>
</td>
</tr>
{%endif%}
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html
index da5a3f7..d2ffdcd 100644
--- a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html
@@ -26,7 +26,7 @@
<a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
{% endif %}
<span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%}
- </span>
+ </span>
{%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
</a>
{% endif %}
@@ -71,24 +71,42 @@
{% else %} {# we use the project's page recent build design #}
- <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %}">
- <div class="row-fluid">
+
+ <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %} project-name">
+ <span class="label label-danger"> {{buildrequest.project.name}} </span>
+ <div class="row-fluid">
+
{% if buildrequest.state == buildrequest.REQ_FAILED %}
- <div class="lead span3">
- <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ <div class="span3 lead">
+ <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk%}" class="error">
+ <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ </a>
+ </div>
+ <div class="span2 lead">
+ {% if buildrequest.updated|format_build_date %}
+ {{ buildrequest.updated|date:'d/m/y H:i' }}
+ {% else %}
+ {{ buildrequest.updated|date:'H:i' }}
+ {% endif %}
+ </div>
+ <div class="span2 lead">
+ {% if buildrequest.brerror_set.all.count %}
+ <i class="icon-minus-sign red"></i> <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk %}#errors" class="error">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a>
+ {% endif %}
</div>
- <div >
+ <div class="span2 lead"> {# there are no warnings for buildrequests #}
</div>
- <div class="row-fluid">
- {% for e in buildrequest.brerror_set.all|slice:":3" %}
- <div class="air well">
- <pre>{{e.errmsg|whitespace_slice:":150"}}</pre>
- </div>
- {% endfor %}
+ <div class="lead ">
+ <span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}">
+ Build time: <a href="{% url 'buildrequestdetails' buildrequest.project.id buildrequest.pk %}">{{ buildrequest.get_duration|sectohms }}</a>
+ </span>
+ <button class="btn btn-danger pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' buildrequest.project.id as bpi%}{{bpi|json}}, {{buildrequest.project.name|json}}, {{buildrequest.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
+
</div>
+
{% elif buildrequest.state == buildrequest.REQ_QUEUED %}
<div class="lead span5">
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
index 8f9172c..2a8bd58 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -13,11 +13,11 @@
No builds found
{% else %}
- {% if request.GET.filter or request.GET.search %}
- {{objects.paginator.count}} builds found
- {% else %}
+ {% if request.GET.filter or request.GET.search %}
+ {{objects.paginator.count}} builds found
+ {% else %}
Project builds <small>({{objects.paginator.count}})</small>
- {% endif %}
+ {% endif %}
{% endif %}
<i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
</h1>
@@ -89,23 +89,23 @@
<tr class="data">
- <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
+ <td class="outcome">{% if br.state == br.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
<td class="target">
- <span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}"><span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
</td>
<td class="machine">
- {{br.machine}}
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.machine}}</a>
</td>
<td class="started_on">
- {{br.created|date:"d/m/y H:i"}}
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.created|date:"d/m/y H:i"}}</a>
</td>
<td class="completed_on">
- {{br.updated|date:"d/m/y H:i"}}
+ <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.updated|date:"d/m/y H:i"}}</a>
</td>
<td class="failed_tasks error">
- {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}}
</td>
<td class="errors_no">
+ <a class="errors_no error" href="{% url "buildrequestdetails" br.project.id br.id %}#errors">{{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}</a>
</td>
<td class="warnings_no">
</td>
OpenPOWER on IntegriCloud