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@452: %> teichmann@452: teichmann@476: teichmann@476: teichmann@478: teichmann@476: teichmann@476: Sägewerk - <%= escape(description) %> teichmann@476: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@460: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452:

<%= escape(description) %>

teichmann@452: <%= header %> teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@478: teichmann@452: teichmann@452: teichmann@452: <% teichmann@452: teichmann@452: def nn(s, d=""): teichmann@452: if not s: return d teichmann@452: return escape(s) teichmann@452: teichmann@478: def pretty_time(t, format="%H:%M:%S"): teichmann@452: if not t: return "<unknown>" teichmann@452: return t.strftime(format) teichmann@452: teichmann@478: def pretty_timedelta(a, b): teichmann@478: if a is None or b is None: return "<unknown>" teichmann@478: td = a - b teichmann@478: secs = td.days * 24*3600 + td.seconds teichmann@478: out = [] teichmann@478: if secs > 3600: teichmann@478: hs = secs // 3600 teichmann@478: out.append("%dh" % hs) teichmann@478: secs %= 3600 teichmann@478: if secs > 60: teichmann@478: ms = secs // 60 teichmann@478: out.append("%dm" % ms) teichmann@478: secs %= 60 teichmann@478: if secs > 0 or not out: teichmann@478: out.append("%ds" % secs) teichmann@478: return " ".join(out) teichmann@452: teichmann@452: def date_from_datetime(x): teichmann@452: if not x: return None teichmann@452: return date(x.year, x.month, x.day) teichmann@452: teichmann@452: def sort_by_start(a, b): teichmann@452: a_start = a.build_start teichmann@452: b_start = b.build_start teichmann@452: if not a_start and not b_start: return 0 teichmann@452: if not a_start: return 1 teichmann@452: if not b_start: return -1 teichmann@452: return cmp(a_start, b_start) teichmann@452: teichmann@474: def create_tags_link(tag_url): teichmann@474: return quoteattr(tag_url.replace( teichmann@474: "svn://anonsvn.kde.org/home/kde", teichmann@474: "http://websvn.kde.org")) teichmann@474: teichmann@452: track_items = sorted(track_items, cmp=sort_by_start, reverse=True) teichmann@452: teichmann@452: last_date = None teichmann@452: teichmann@452: STATUS2CLASS = { teichmann@452: 'creating_binary_package': 'inprogress', teichmann@468: 'creating_source_package': 'inprogress', aheinecke@472: 'source_package_created': 'inprogress', teichmann@452: 'binary_package_created': 'finished' teichmann@452: } teichmann@452: teichmann@452: STATUS2MSG = { teichmann@452: 'creating_binary_package': 'building binary packages', teichmann@468: 'creating_source_package': 'building source package', aheinecke@472: 'source_package_created': 'preparing build envrionment', aheinecke@472: 'binary_package_created': 'build successful' teichmann@452: } teichmann@452: teichmann@452: for track_item in track_items: teichmann@452: # for all track items teichmann@452: curr_date = date_from_datetime(track_item.build_start) teichmann@452: if curr_date != last_date: teichmann@452: last_date = curr_date teichmann@452: %> teichmann@452: teichmann@452: <% teichmann@452: # date changed teichmann@452: %> teichmann@452: teichmann@478: teichmann@478: teichmann@478: teichmann@478: teichmann@478: teichmann@478: teichmann@478: teichmann@452: teichmann@452: <% teichmann@452: # for all track itemes teichmann@452: %> teichmann@452: teichmann@452:
StatusPackageRevisionStartStopDurationNotes
<%= pretty_time(last_date, "%Y-%m-%d") %>
<%= STATUS2MSG.get(track_item.build_status, 'error') %><%= nn(track_item.track) %> teichmann@474: <% 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@474: %> teichmann@478: <%= nn(track_item.revision) %> teichmann@474: <% teichmann@474: # end if tags teichmann@474: %> teichmann@478: <%= pretty_time(track_item.build_start) %><%= pretty_time(track_item.build_stop) %><%= pretty_timedelta(track_item.stop, track_item.build_start) %> 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@452: %> teichmann@478:
teichmann@475:
teichmann@478: report generated at <%= pretty_time(datetime.now(), "%Y-%m-%d %H:%M:%S") %>, powered teichmann@475: by Tree Packager teichmann@452: teichmann@478: teichmann@452: teichmann@452:
teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452: teichmann@452:
teichmann@452:
teichmann@452:
teichmann@473: teichmann@452: This site is hosted by the Intevation GmbH teichmann@452: teichmann@452:
teichmann@452: teichmann@452: teichmann@452: