teichmann@473: teichmann@452: <% teichmann@452: from cgi import escape teichmann@452: from xml.sax.saxutils import quoteattr teichmann@452: teichmann@475: from datetime import date, datetime teichmann@482: teichmann@482: def nn(s, d=""): teichmann@482: if not s: return d teichmann@482: return escape(s) teichmann@482: teichmann@482: def pretty_time(t, format="%H:%M:%S"): teichmann@482: if not t: return "<unknown>" teichmann@482: return t.strftime(format) teichmann@482: teichmann@482: def pretty_timedelta(a, b): teichmann@482: if a is None or b is None: return "<unknown>" teichmann@482: td = a - b teichmann@482: secs = td.days * 24*3600 + td.seconds teichmann@482: out = [] teichmann@482: if secs > 3600: teichmann@482: hs = secs // 3600 teichmann@482: out.append("%dh" % hs) teichmann@482: secs %= 3600 teichmann@482: if secs > 60: teichmann@482: ms = secs // 60 teichmann@482: out.append("%dm" % ms) teichmann@482: secs %= 60 teichmann@482: if secs > 0 or not out: teichmann@482: out.append("%ds" % secs) teichmann@482: return " ".join(out) teichmann@482: teichmann@482: def date_from_datetime(x): teichmann@482: if not x: return None teichmann@482: return date(x.year, x.month, x.day) teichmann@482: teichmann@482: def sort_by_start(a, b): teichmann@482: a_start = a.build_start teichmann@482: b_start = b.build_start teichmann@482: if not a_start and not b_start: return 0 teichmann@482: if not a_start: return 1 teichmann@482: if not b_start: return -1 teichmann@482: return cmp(a_start, b_start) teichmann@482: teichmann@482: def create_tags_link(tag_url): teichmann@482: return quoteattr(tag_url.replace( teichmann@482: "svn://anonsvn.kde.org/home/kde", teichmann@482: "http://websvn.kde.org")) teichmann@482: teichmann@482: track_items = sorted(track_items, cmp=sort_by_start, reverse=True) teichmann@482: teichmann@482: last_date = None teichmann@482: teichmann@482: STATUS2CLASS = { teichmann@482: 'creating_binary_package': 'inprogress', teichmann@482: 'creating_source_package': 'inprogress', teichmann@482: 'source_package_created': 'inprogress', teichmann@482: 'binary_package_created': 'finished' teichmann@482: } teichmann@482: teichmann@482: STATUS2MSG = { teichmann@482: 'creating_binary_package': 'building binary packages', teichmann@482: 'creating_source_package': 'building source package', teichmann@482: 'source_package_created': 'preparing build envrionment', teichmann@482: 'binary_package_created': 'success' teichmann@482: } teichmann@452: %> teichmann@452: teichmann@483: <%@include file="header.inc" %> teichmann@452: teichmann@485:
Status | teichmann@485:Package | teichmann@485:Revision | teichmann@485:Start | teichmann@485:Stop | teichmann@485:Duration | teichmann@485:Notes | teichmann@452:
---|---|---|---|---|---|---|
<%= pretty_time(last_date, "%Y-%m-%d") %> (times in UTC) | ||||||
<%= STATUS2MSG.get(track_item.build_status, 'error') %> | teichmann@478:<%= nn(track_item.track) %> | teichmann@484:<% teichmann@474: tags = track_item.build_tags teichmann@474: if tags: teichmann@474: # a tag teichmann@474: %> teichmann@478: ><%= nn(track_item.revision) %> teichmann@474: <% teichmann@474: else: teichmann@474: # not a tag teichmann@484: %><%= nn(track_item.revision) %><% teichmann@474: # end if tags teichmann@484: %> | teichmann@478:<%= pretty_time(track_item.build_start) %> | teichmann@478:<%= pretty_time(track_item.build_stop) %> | teichmann@478:<%= pretty_timedelta(track_item.stop, track_item.build_start) %> | teichmann@478:teichmann@452: <% teichmann@452: for log_desc, log_path in track_item.build_logs: teichmann@452: # for all logs teichmann@452: %> teichmann@452: [><%= nn(log_desc) %>] teichmann@452: <% teichmann@452: # for all logs teichmann@484: %> | teichmann@452: