From d1dbf4c078e04fdc0f3b971f62cdefcba4904232 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 16 Jan 2015 16:42:40 +0000 Subject: bitbake: toaster: project builds page This is a complete re-write of the "Project builds" page based on the "All builds" page in managed mode. [YOCTO #6589] (Bitbake rev: 0353d49ae934c4595408e1b7a1443769f095f2aa) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../toastergui/templates/projectbuilds.html | 118 ++++++++++++++++----- 1 file changed, 92 insertions(+), 26 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/templates/projectbuilds.html') diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html index 8c5942c7cb..8f9172c6d5 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html +++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html @@ -9,40 +9,72 @@ {% block projectinfomain %} - - - -{% include "basetable_top.html" %} - {% for build in objects %} + {% if objects.paginator.count == 0 %} +
+
+
+ {% if request.GET.search %}{% endif %} + + +
+
+
+ + + {% else %} + + {% include "basetable_top.html" %} + + {% for br in objects %}{% if br.build %} {% with build=br.build %} {# if we have a build, just display it #} {%if build.outcome == build.SUCCEEDED%}{%elif build.outcome == build.FAILED%}{%else%}{%endif%} {% for t in build.target_set.all %} {{t.target}}
{% endfor %} {{build.machine}} {{build.started_on|date:"d/m/y H:i"}} {{build.completed_on|date:"d/m/y H:i"}} - {% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}{{exectask.0.recipe.name}}.{{exectask.0.task_name}}{% elif exectask.count > 1%}{{exectask.count}}{%endif%} - {% if build.errors_no %}{{build.errors_no}} error{{build.errors_no|pluralize}}{%endif%} + + {% query build.task_build outcome=4 order__gt=0 as exectask%} + {% if exectask.count == 1 %} + {{exectask.0.recipe.name}}.{{exectask.0.task_name}} + {% if MANAGED and build.project %} + + + + {% endif %} + {% elif exectask.count > 1%} + {{exectask.count}} task{{exectask.count|pluralize}} + {%endif%} + + + {% if build.errors_no %} + {{build.errors_no}} error{{build.errors_no|pluralize}} + {% if MANAGED and build.project %} + + + + {% endif %} + {%endif%} + {% if build.warnings_no %}{{build.warnings_no}} warning{{build.warnings_no|pluralize}}{%endif%} {{build.timespent|sectohms}} - {{build.cooker_log_path}} + {% if not MANAGED or not build.project %} + {{build.cooker_log_path}} + {% endif %} {% if build.outcome == build.SUCCEEDED %} {{fstypes|get_dict_value:build.id}} @@ -50,10 +82,44 @@ - {% endfor %} -{% include "basetable_bottom.html" %} - + {%endwith%} + {% else %} {# we don't have a build for this build request, mask the data with build request data #} + + + + + {% if buildrequest.state == buildrequest.REQ_FAILED %}{%else%}FIXME_build_request_state{%endif%} + + 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%} + + + {{br.machine}} + + + {{br.created|date:"d/m/y H:i"}} + + + {{br.updated|date:"d/m/y H:i"}} + + + {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}} + + + + + + + {{br.timespent.total_seconds|sectohms}} + + {# we have no output here #} + + + {%endif%} + {% endfor %} + + {% include "basetable_bottom.html" %} +{% endif %} {% endblock %} -- cgit v1.2.3-54-g00ecf