summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py8
-rw-r--r--bitbake/lib/toaster/toastergui/templates/builddashboard.html11
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html10
3 files changed, 24 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 79673f5dab..969eb04aaa 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -1197,9 +1197,13 @@ class BuildsTable(ToasterTable):
1197 1197
1198 time_template = ''' 1198 time_template = '''
1199 {% load projecttags %} 1199 {% load projecttags %}
1200 <a href="{% url "buildtime" data.id %}"> 1200 {% if data.outcome == extra.Build.SUCCEEDED %}
1201 <a href="{% url "buildtime" data.id %}">
1202 {{data.timespent_seconds | sectohms}}
1203 </a>
1204 {% else %}
1201 {{data.timespent_seconds | sectohms}} 1205 {{data.timespent_seconds | sectohms}}
1202 </a> 1206 {% endif %}
1203 ''' 1207 '''
1204 1208
1205 image_files_template = ''' 1209 image_files_template = '''
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index 07fc26c6dd..61ae583d23 100644
--- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -38,8 +38,15 @@
38 {% endif %} 38 {% endif %}
39 <span class="pull-right"> 39 <span class="pull-right">
40 Build time: 40 Build time:
41 <a class="alert-link" href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a> 41 <span data-build-field="buildtime">
42 </span> 42 {% if build.outcome == build.SUCCEEDED %}
43 <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a>
44 {% else %}
45 {{ build.timespent_seconds|sectohms }}
46 {% endif %}
47 </span>
48 </span>
49
43 {%endif%} 50 {%endif%}
44</div> 51</div>
45 52
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index 38a72f9afb..b761ffe1df 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -198,7 +198,15 @@
198 198
199 <!-- build time --> 199 <!-- build time -->
200 <div class="col-md-3"> 200 <div class="col-md-3">
201 Build time: <a class="alert-link" href="<%:buildtime_url%>"><%:buildtime%></a> 201 Build time:
202
203 <span data-role="data-recent-build-buildtime-field">
204 <%if state == 'Succeeded'%>
205 <a class="alert-link" href="<%:buildtime_url%>"><%:buildtime%></a>
206 <%else%>
207 <%:buildtime%>
208 <%/if%>
209 </span>
202 210
203 <!-- rebuild button --> 211 <!-- rebuild button -->
204 <%include tmpl='#rebuild-template'/%> 212 <%include tmpl='#rebuild-template'/%>