diff bitten/web_ui.py @ 876:30134493d3c6 0.6.x

0.6dev: Merged [952:953] from trunk.
author osimons
date Thu, 21 Oct 2010 09:36:28 +0000
parents 8df9bc903edb
children 6b319a8ae32e
line wrap: on
line diff
--- a/bitten/web_ui.py
+++ b/bitten/web_ui.py
@@ -54,8 +54,10 @@
                       BuildStep.IN_PROGRESS: 'in progress'}
 
 def _get_build_data(env, req, build):
+    platform = TargetPlatform.fetch(env, build.platform)
     data = {'id': build.id, 'name': build.slave, 'rev': build.rev,
             'status': _status_label[build.status],
+            'platform': getattr(platform, 'name', 'unknown'),
             'cls': _status_label[build.status].replace(' ', '-'),
             'href': req.href.build(build.config, build.id),
             'chgset_href': req.href.changeset(build.rev)}
@@ -321,7 +323,7 @@
             builds = []
             # sort correctly by revision.
             for build in sorted(in_progress_builds,
-                                cmp=lambda x, y: int(y.rev) - int(x.rev)):
+                                cmp=lambda x, y: int(y.rev_time) - int(x.rev_time)):
                 rev = build.rev
                 build_data = _get_build_data(self.env, req, build)
                 build_data['rev'] = rev
Copyright (C) 2012-2017 Edgewall Software