summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html50
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py5
2 files changed, 32 insertions, 23 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index 54590ee3da..039601f476 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -130,29 +130,35 @@ vim: expandtab tabstop=2
130 <switch ng-switch="b.status"> 130 <switch ng-switch="b.status">
131 131
132 <case ng-switch-when="failed"> 132 <case ng-switch-when="failed">
133 <div class="lead span3"> <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span></div> 133 <div class="lead span3">
134 <div > 134 <a ng-class="{'succeeded': 'success', 'failed': 'error'}[b.status]" href="{[b.br_page_url]}">
135 <button class="btn pull-right btn-danger" ng-click="buildExistingTarget(b.targets)">Run again</button> 135 <span ng-repeat="t in b.targets" ng-include src="'target_display'"></span>
136 </a>
136 </div> 137 </div>
137 <div class="row-fluid"> 138 <div class="span2 lead">
138 <div class="air well" ng-repeat="e in b.errors"> 139 <ngif ng-if="b.updated - todaydate > 0">
139 <pre>{[e.msg]}</pre> 140 {[b.updated|date:'HH:mm']}
140 <ngif ng-if="e.msg.indexOf('Nothin') == 0"> 141 </ngif>
141 <div ng-repeat="t in getTargetNameFromErrorMsg(e.msg)"> 142 <ngif ng-if="b.updated - todaydate < 0">
142 <p class="lead">The target <strong>{[t]}</strong> is not provided by any of your project layers.</p> 143 {[b.updated|date:'dd/MM/yy HH:mm']}
143 <p> Your build has failed because the target <strong>{[t]}</strong> is not provided by any of your project layers.</p> 144 </ngif>
144 <ngif ng-if="layersForTargets[t].length > 0"> 145 </div>
145 <p>The following layers provide this target. You could add one of them to your project.</p> 146 <div class="span2">
146 <button class="btn btn-danger add-layer-with-dependencies" ng-repeat="l in layersForTargets[t]" ng-click="layerAddById(l.id)">Add {[l.name]}</button> 147 <ngif ng-if="b.errors.length">
147 </ngif> 148 <span>
148 </div> 149 <i class="icon-minus-sign red lead"></i>
149 </ngif> 150 <a href="{[b.br_page_url]}#errors" class="lead error">{[b.errors.length]}
150 <ngif ng-if="e.msg.indexOf('Nothin') != 0"> 151 <ng-pluralize count="b.errors.length" when="{'1':'error','other':'errors'}"></ng-pluralize></a>
151 <p> 152 </span>
152 Please contact your system administrator to help troubleshoot this error. 153 </ngif>
153 </p> 154 </div>
154 </ngif> 155 <div class="span2">
155 </div> 156 <!-- we don't have warnings in this case -->
157 </div>
158 <div> <span class="lead">Build time: {[b.command_time|timediff]}</span>
159 <button class="btn pull-right" ng-class="{'succeeded': 'btn-success', 'failed': 'btn-danger'}[b.status]"
160 ng-click="buildExistingTarget(b.targets)">Run again</button>
161
156 </div> 162 </div>
157 </case> 163 </case>
158 164
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 8034cfceaf..1e9df3fc5e 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -66,7 +66,10 @@ def _project_recent_build_list(prj):
66 "id": x.pk, 66 "id": x.pk,
67 "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.brtarget_set.all()), 67 "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.brtarget_set.all()),
68 "status": x.get_state_display(), 68 "status": x.get_state_display(),
69 "errors": map(lambda y: {"type": y.errtype, "msg": y.errmsg, "tb": y.traceback}, x.brerror_set.exclude(errmsg__contains="Command Failed")), 69 "errors": map(lambda y: {"type": y.errtype, "msg": y.errmsg, "tb": y.traceback}, x.brerror_set.all()),
70 "updated": x.updated.strftime('%s')+"000",
71 "command_time": (x.updated - x.created).total_seconds(),
72 "br_page_url": reverse('buildrequestdetails', args=(x.project.id, x.pk) ),
70 "build" : map( lambda y: {"id": y.pk, 73 "build" : map( lambda y: {"id": y.pk,
71 "status": y.get_outcome_display(), 74 "status": y.get_outcome_display(),
72 "completed_on" : y.completed_on.strftime('%s')+"000", 75 "completed_on" : y.completed_on.strftime('%s')+"000",