mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
bitbake: toastergui: Consider task name when restarting a build in /builds
Previously the same issue was fixed for project view. 'Run again' button now restarts builds using target:task also in builds view. [YOCTO #7442] (Bitbake rev: ae6349a13f11b6fa90fe5603b000bef14ee0f2f0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6fab4cb701
commit
52fe880f9e
@@ -54,7 +54,17 @@
|
||||
Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
|
||||
</span>
|
||||
{% if build.project %}
|
||||
<button class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {% url 'project' buildrequest.project.id as bpurl%}{{bpurl|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
|
||||
<button class="btn
|
||||
{% if build.outcome == build.SUCCEEDED %}
|
||||
btn-success
|
||||
{% elif build.outcome == build.FAILED %}
|
||||
btn-danger
|
||||
{% else %}
|
||||
btn-info
|
||||
{%endif%}
|
||||
pull-right"
|
||||
{% include "runagain.html" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%endif%}
|
||||
@@ -104,8 +114,10 @@
|
||||
<span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}">
|
||||
Build time: {{ buildrequest.get_duration|sectohms }}
|
||||
</span>
|
||||
<button class="btn btn-danger pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' buildrequest.project.id as bpi%}{{bpi|json}}, {{buildrequest.project.name|json}}, {% url 'project' buildrequest.project.id as bpurl%}{{bpurl|json}}, {{buildrequest.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
|
||||
|
||||
<button class="btn btn-danger pull-right"
|
||||
{% include "runagain.html" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
7
bitbake/lib/toaster/toastergui/templates/runagain.html
Normal file
7
bitbake/lib/toaster/toastergui/templates/runagain.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% load projecttags %}
|
||||
onclick='scheduleBuild(
|
||||
{% url 'xhr_projectbuild' 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
|
||||
@@ -44,9 +44,10 @@ def sectohms(time):
|
||||
return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60)
|
||||
|
||||
|
||||
@register.filter(name = 'mapselect')
|
||||
def mapselect(value, argument):
|
||||
return map(lambda x: vars(x)[argument], value)
|
||||
@register.filter(name = 'get_tasks')
|
||||
def get_tasks(queryset):
|
||||
return list(target + ':' + task if task else target \
|
||||
for target, task in queryset.values_list('target', 'task'))
|
||||
|
||||
|
||||
@register.filter(name = "json")
|
||||
|
||||
Reference in New Issue
Block a user