diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/project.html | 4 | ||||
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index 40e2e1fffa..ea44bf34f1 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js | |||
@@ -132,8 +132,8 @@ projectApp.filter('timediff', function() { | |||
132 | var seconds = parseInt(input); | 132 | var seconds = parseInt(input); |
133 | var minutes = Math.floor(seconds / 60); | 133 | var minutes = Math.floor(seconds / 60); |
134 | seconds = seconds - minutes * 60; | 134 | seconds = seconds - minutes * 60; |
135 | var hours = Math.floor(seconds / 3600); | 135 | var hours = Math.floor(minutes / 60); |
136 | seconds = seconds - hours * 3600; | 136 | minutes = minutes - hours * 60; |
137 | return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds); | 137 | return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds); |
138 | }; | 138 | }; |
139 | }); | 139 | }); |
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 1a8991fda4..b5d97cb419 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
@@ -145,7 +145,7 @@ vim: expandtab tabstop=2 | |||
145 | 145 | ||
146 | <a id="buildslist"></a> | 146 | <a id="buildslist"></a> |
147 | <h2 class="air" data-ng-if="builds.length">Latest builds</h2> | 147 | <h2 class="air" data-ng-if="builds.length">Latest builds</h2> |
148 | <div class="animate-repeat alert" data-ng-repeat="b in builds track by b.id" data-ng-class="{'Queued':'alert-info', 'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.status]"> | 148 | <div class="animate-repeat alert" data-ng-repeat="b in builds track by b.id" data-ng-class="{'queued':'alert-info', 'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.status]"> |
149 | <div class="row-fluid"> | 149 | <div class="row-fluid"> |
150 | <switch data-ng-switch="b.status"> | 150 | <switch data-ng-switch="b.status"> |
151 | 151 | ||
@@ -182,7 +182,7 @@ vim: expandtab tabstop=2 | |||
182 | </div> | 182 | </div> |
183 | </case> | 183 | </case> |
184 | 184 | ||
185 | <case data-ng-switch-when="Queued"> | 185 | <case data-ng-switch-when="queued"> |
186 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | 186 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> |
187 | <div class="span4 lead" >Build queued | 187 | <div class="span4 lead" >Build queued |
188 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> | 188 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 2336ae3bec..00b1387d63 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -64,7 +64,9 @@ def _get_latest_builds(prj=None): | |||
64 | if prj is not None: | 64 | if prj is not None: |
65 | queryset = queryset.filter(project = prj) | 65 | queryset = queryset.filter(project = prj) |
66 | 66 | ||
67 | return itertools.chain(queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-pk")[:3], queryset.filter(outcome=Build.IN_PROGRESS).order_by("-pk")) | 67 | return itertools.chain( |
68 | queryset.filter(outcome=Build.IN_PROGRESS).order_by("-pk"), | ||
69 | queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-pk")[:3] ) | ||
68 | 70 | ||
69 | 71 | ||
70 | # a JSON-able dict of recent builds; for use in the Project page, xhr_ updates, and other places, as needed | 72 | # a JSON-able dict of recent builds; for use in the Project page, xhr_ updates, and other places, as needed |
@@ -76,7 +78,7 @@ def _project_recent_build_list(prj): | |||
76 | "id": x.pk, | 78 | "id": x.pk, |
77 | "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.target_set.all()), # TODO: create the task entry in the Target table | 79 | "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.target_set.all()), # TODO: create the task entry in the Target table |
78 | "status": x.get_current_status(), | 80 | "status": x.get_current_status(), |
79 | "errors": map(lambda y: {"type": y.lineno, "msg": y.message, "tb": y.pathname}, x.logmessage_set.filter(level__gte=LogMessage.WARNING)), | 81 | "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))), |
80 | "updated": x.completed_on.strftime('%s')+"000", | 82 | "updated": x.completed_on.strftime('%s')+"000", |
81 | "command_time": (x.completed_on - x.started_on).total_seconds(), | 83 | "command_time": (x.completed_on - x.started_on).total_seconds(), |
82 | "br_page_url": reverse('buildrequestdetails', args=(x.project.id, x.pk) ), | 84 | "br_page_url": reverse('buildrequestdetails', args=(x.project.id, x.pk) ), |