diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html
index e9211affcd..00d1d4edd1 100644
--- a/bitbake/lib/toaster/toastergui/templates/builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/builds.html
@@ -46,7 +46,11 @@
@@ -60,8 +64,8 @@
{% for build in objects %}
- {%if build.outcome == build.SUCCEEDED%} {%elif build.outcome == build.FAILED%} {%else%}{%endif%}
-
+ {%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"}}
@@ -77,19 +81,19 @@
{{exectask.count}} task{{exectask.count|pluralize}}
{%endif%}
-
- {% if build.errors_no %}
- {{build.errors_no}} error{{build.errors_no|pluralize}}
+
+ {% if build.errors.count %}
+ {{build.errors.count}} error{{build.errors.count|pluralize}}
{%endif%}
- {% if build.warnings_no %}{{build.warnings_no}} warning{{build.warnings_no|pluralize}} {%endif%}
- {{build.timespent|sectohms}}
+ {% if build.warnings.count %}{{build.warnings.count}} warning{{build.warnings.count|pluralize}} {%endif%}
+ {{build.timespent_seconds|sectohms}}
{% if build.outcome == build.SUCCEEDED %}
{{fstypes|get_dict_value:build.id}}
{% endif %}
-
+
{{build.project.name}}
diff --git a/bitbake/lib/toaster/toastergui/templates/configuration.html b/bitbake/lib/toaster/toastergui/templates/configuration.html
index 2aa1ae1a49..3e489918d2 100644
--- a/bitbake/lib/toaster/toastergui/templates/configuration.html
+++ b/bitbake/lib/toaster/toastergui/templates/configuration.html
@@ -50,9 +50,6 @@
Layer
Layer branch
Layer commit
- {% if not MANAGED or not build.project %}
-
Layer directory
- {% endif %}
{% for lv in build.layer_version_build.all|dictsort:"layer.name" %}
@@ -63,9 +60,6 @@
{{lv.commit}} ">
{{lv.commit|truncatechars:13}}
- {% if not MANAGED or not build.project %}
- {{lv.local_path}}
- {% endif %}
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
index 56e2b21cc0..1101aa8100 100644
--- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
+++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html
@@ -40,8 +40,10 @@
{% endif %}
{% endfor %}
+ {% if last_date_from and last_date_to %}
+ {% endif %}
{% endblock twocolumns %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
index 896c3b5af7..ac87d8c166 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -79,25 +79,20 @@
{% 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 build.errors.count %}
+ {{build.errors.count}} error{{build.errors.count|pluralize}}
{%endif%}
-
{% if build.warnings_no %}{{build.warnings_no}} warning{{build.warnings_no|pluralize}} {%endif%}
-
{{build.timespent|sectohms}}
- {% if not MANAGED or not build.project %}
-
{{build.cooker_log_path}}
- {% endif %}
+
{% if build.warnings.count %}{{build.warnings.count}} warning{{build.warnings.count|pluralize}} {%endif%}
+
{{build.timespent_seconds|sectohms}}
{% if build.outcome == build.SUCCEEDED %}
{{fstypes|get_dict_value:build.id}}
@@ -113,23 +108,23 @@
{% if br.state == br.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%}
+ 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.machine}}
- {{br.created|date:"d/m/y H:i"}}
+ {{br.created|date:"d/m/y H:i"}}
- {{br.updated|date:"d/m/y H:i"}}
+ {{br.updated|date:"d/m/y H:i"}}
-
- {{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}
+
+ {{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}
-
+
{{br.timespent.total_seconds|sectohms}}
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html
index 9c4346c45a..e6519530ef 100644
--- a/bitbake/lib/toaster/toastergui/templates/projects.html
+++ b/bitbake/lib/toaster/toastergui/templates/projects.html
@@ -26,7 +26,10 @@
@@ -58,8 +61,8 @@
{{o.get_number_of_builds}}
{%if o.get_last_outcome == build_SUCCEEDED%} {%elif o.get_last_outcome == build_FAILED%} {%else%}{%endif%}
{{o.get_last_target}}
-
{% if o.get_last_errors %}{{o.get_last_errors}} error{{o.get_last_errors|pluralize}} {%endif%}
-
{% if o.get_last_warnings %}{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}} {%endif%}
+
{% if o.get_last_errors %}{{o.get_last_errors}} error{{o.get_last_errors|pluralize}} {%endif%}
+
{% if o.get_last_warnings %}{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}} {%endif%}
{% if o.get_last_outcome == build_SUCCEEDED %}
{{fstypes|get_dict_value:o.id}}
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe.html b/bitbake/lib/toaster/toastergui/templates/recipe.html
index dd8753d7fc..b5e4192d6b 100644
--- a/bitbake/lib/toaster/toastergui/templates/recipe.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipe.html
@@ -53,13 +53,6 @@
{{layer.name}}
- {% if not MANAGED or not build.project %}
-
-
- Layer directory
-
- {{object.layer_version.local_path}}
- {% endif %}
Recipe file
@@ -126,7 +119,7 @@
{{task.get_outcome_display}}
- {% if MANAGED and build.project and task.outcome = task.OUTCOME_FAILED %}
+ {% if task.outcome = task.OUTCOME_FAILED %}
diff --git a/bitbake/lib/toaster/toastergui/templates/recipes.html b/bitbake/lib/toaster/toastergui/templates/recipes.html
index 8d4494e7ef..5cdac437c4 100644
--- a/bitbake/lib/toaster/toastergui/templates/recipes.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipes.html
@@ -28,7 +28,7 @@
@@ -102,11 +102,6 @@
{{recipe.layer_version.commit|truncatechars:13}}
-
- {% if not MANAGED or not build.project %}
-
- {{recipe.layer_version.local_path}}
- {% endif %}
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/runagain.html b/bitbake/lib/toaster/toastergui/templates/runagain.html
deleted file mode 100644
index b4ba5fbf15..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/runagain.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% load projecttags %}
-onclick='scheduleBuild(
- {% url 'projectbuilds' buildrequest.project.id as bpi %}{{bpi|json}},
- {{buildrequest.project.name|json}},
- {% url 'project' buildrequest.project.id as bpurl %}{{bpurl|json}},
- {{buildrequest.brtarget_set.all|get_tasks|json}})
-'>Run again
diff --git a/bitbake/lib/toaster/toastergui/templates/target.html b/bitbake/lib/toaster/toastergui/templates/target.html
index e7febaf22a..fa59f4eeba 100644
--- a/bitbake/lib/toaster/toastergui/templates/target.html
+++ b/bitbake/lib/toaster/toastergui/templates/target.html
@@ -152,11 +152,6 @@
{{package.recipe.layer_version.commit|truncatechars:13}}
- {% if not MANAGED or not build.project %}
-
- {{ package.recipe.layer_version.local_path }}
-
- {% endif %}
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/task.html b/bitbake/lib/toaster/toastergui/templates/task.html
index 6e06ddfa31..635098a024 100644
--- a/bitbake/lib/toaster/toastergui/templates/task.html
+++ b/bitbake/lib/toaster/toastergui/templates/task.html
@@ -23,18 +23,7 @@
{%if task.task_executed %}
{# executed tasks outcome #}
{% if task.logfile %}
- {% if MANAGED and build.project %}
Download task log
- {% else %}
-
-
- Log file
-
-
- {{task.logfile}}
-
-
- {% endif %}
{% endif %}
{# show stack trace for failed task #}
{% if task.outcome == task.OUTCOME_FAILED and log_head %}
@@ -130,22 +119,12 @@
{%elif task.outcome == task.OUTCOME_CACHED%}
- {% if MANAGED and build.project %}
{% for t in task.get_related_setscene %}
{% if forloop.last %}
Download task log
{% endif %}
{% endfor %}
- {% else %}
-
-
- Log file
-
-
- {% for t in task.get_related_setscene %} {{t.logfile}} {% endfor %}
-
-
- {% endif %}
+
{%elif task.outcome == task.OUTCOME_EMPTY%}
This task is empty because it has the noexec flag set to 1, or the task function is empty
@@ -200,20 +179,7 @@
Failed to restore output from sstate cache. The file was found but could not be unpacked.
- {% if MANAGED and build.project %}
Download log
- {% else %}
-
-
- Log file
-
- {{task.logfile}}
-
-
- Time (secs)
-
- {{task.elapsed_time|format_none_and_zero}}
- {% endif %}
Running the real task instead.
diff --git a/bitbake/lib/toaster/toastergui/templates/tasks.html b/bitbake/lib/toaster/toastergui/templates/tasks.html
index 32c0552360..b18b5c7c46 100644
--- a/bitbake/lib/toaster/toastergui/templates/tasks.html
+++ b/bitbake/lib/toaster/toastergui/templates/tasks.html
@@ -93,7 +93,7 @@
{{task.get_outcome_display}}
- {% if MANAGED and build.project and task.outcome = task.OUTCOME_FAILED %}
+ {% if task.outcome = task.OUTCOME_FAILED %}
@@ -113,11 +113,6 @@
{{task.disk_io|format_none_and_zero}}
- {% if not MANAGED or not build.project %}
-
- {{task.logfile}}
-
- {% endif %}
{% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 681f06787a..feb15139fb 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -131,9 +131,6 @@ urlpatterns = patterns('toastergui.views',
url(r'^xhr_importlayer/$', 'xhr_importlayer', name='xhr_importlayer'),
url(r'^xhr_updatelayer/$', 'xhr_updatelayer', name='xhr_updatelayer'),
- # dashboard for failed build requests
- url(r'^project/(?P
\d+)/buildrequest/(?P\d+)$', 'buildrequestdetails', name='buildrequestdetails'),
-
# default redirection
url(r'^$', RedirectView.as_view( url= 'landing')),
)
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 00b1387d63..8c6f9fa84f 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -21,7 +21,7 @@
import operator,re
-from django.db.models import Q, Sum, Count, Max
+from django.db.models import F, Q, Sum, Count, Max
from django.db import IntegrityError
from django.shortcuts import render, redirect
from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
@@ -81,15 +81,15 @@ def _project_recent_build_list(prj):
"errors": map(lambda y: {"type": y.lineno, "msg": y.message, "tb": y.pathname}, (x.logmessage_set.filter(level__gte=LogMessage.WARNING)|x.logmessage_set.filter(level=LogMessage.EXCEPTION))),
"updated": x.completed_on.strftime('%s')+"000",
"command_time": (x.completed_on - x.started_on).total_seconds(),
- "br_page_url": reverse('buildrequestdetails', args=(x.project.id, x.pk) ),
+ "br_page_url": reverse('builddashboard', args=(x.pk,) ),
"build" : map( lambda y: {"id": y.pk,
"status": y.get_outcome_display(),
"completed_on" : y.completed_on.strftime('%s')+"000",
"build_time" : (y.completed_on - y.started_on).total_seconds(),
"build_page_url" : reverse('builddashboard', args=(y.pk,)),
'build_time_page_url': reverse('buildtime', args=(y.pk,)),
- "errors": y.errors_no,
- "warnings": y.warnings_no,
+ "errors": y.errors.count(),
+ "warnings": y.warnings.count(),
"completeper": y.completeper() if y.outcome == Build.IN_PROGRESS else "0",
"eta": y.eta().strftime('%s')+"000" if y.outcome == Build.IN_PROGRESS else "0",
}, [x]),
@@ -1906,7 +1906,7 @@ if True:
(filter_string, search_term, ordering_string) = _search_tuple(request, Build)
# post-process any date range filters
filter_string,daterange_selected = _modify_date_range_filter(filter_string)
- queryset_all = queryset_all.select_related("project")
+ queryset_all = queryset_all.select_related("project").annotate(errors_no = Count('logmessage', only=Q(logmessage__level=LogMessage.ERROR)|Q(logmessage__level=LogMessage.EXCEPTION))).annotate(warnings_no = Count('logmessage', only=Q(logmessage__level=LogMessage.WARNING))).extra(select={'timespent':'completed_on - started_on'})
queryset_with_search = _get_queryset(Build, queryset_all, None, search_term, ordering_string, '-completed_on')
queryset = _get_queryset(Build, queryset_all, filter_string, search_term, ordering_string, '-completed_on')
@@ -2841,10 +2841,3 @@ if True:
_set_parameters_values(pagesize, orderby, request)
return context
-
- @_template_renderer("buildrequestdetails.html")
- def buildrequestdetails(request, pid, bid):
- context = {
- 'buildrequest' : Build.objects.get(pk = bid, project_id = pid).buildrequest
- }
- return context