annotate contrib/sawmill/web/templates/details.html @ 478:7504ed4437e1

sawmill: short start and stop to %H:%M:%S because the date is already printed in the date row. Introduced a column with the duration to create the package.
author Sascha Teichmann <teichmann@intevation.de>
date Thu, 16 Sep 2010 20:24:54 +0000
parents 43bb1cc38fba
children fa8a5205698c
rev   line source
473
d8012571f9e1 sawmill: removed trailing whitespace
Sascha Teichmann <teichmann@intevation.de>
parents: 472
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
2 "http://www.w3.org/TR/html4/loose.dtd">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
3 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
4 from cgi import escape
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
5 from xml.sax.saxutils import quoteattr
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
6
475
7be221f41f58 sawmill: Added 'powered by Tree Packager' line in details view.
Sascha Teichmann <teichmann@intevation.de>
parents: 474
diff changeset
7 from datetime import date, datetime
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
8 %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
9 <html>
476
f3438708a2be The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents: 475
diff changeset
10 <head>
f3438708a2be The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents: 475
diff changeset
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
12 <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
476
f3438708a2be The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents: 475
diff changeset
13 <link rel="stylesheet" href="styles/style.css" type="text/css" media="screen" />
f3438708a2be The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents: 475
diff changeset
14 <title>S&auml;gewerk - <%= escape(description) %></title>
f3438708a2be The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents: 475
diff changeset
15 </head>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
16
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
17 <body>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
18 <table border="0" width="100%" cellspacing="0" cellpadding="0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
19 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
20 <td>
460
10d4cbffcc07 corrected link back to overview in detail view of sawmill
Sascha Teichmann <teichmann@intevation.de>
parents: 452
diff changeset
21 <a href="index.py"><img src="img/logo.jpg" border="0" alt="" width="533" height="94" /></a>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
22 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
23 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
24 </table>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
25 <table border="0" width="100%" cellspacing="0" cellpadding="0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
26
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
27 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
28 <td align="left" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
29 <img src="img/topleft.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
30 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
31 <td bgcolor="#E0E0E0" width="30">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
32 <img src="img/clear.png" width="30" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
33 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
34 <td bgcolor="#E0E0E0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
35 <img src="img/clear.png" width="1" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
36
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
37 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
38 <td bgcolor="#E0E0E0" width="30">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
39 <img src="img/clear.png" width="30" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
40 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
41 <td align="right" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
42 <img src="img/topright.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
43 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
44 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
45
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
46 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
47 <!-- Outer body row -->
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
48 <td bgcolor="#E0E0E0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
49 <img src="img/clear.png" width="10" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
50 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
51 <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
52 <!-- Inner Tabs / Shell -->
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
53 <table border="0" width="100%" cellspacing="0" cellpadding="0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
54 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
55
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
56 <td align="left" bgcolor="#ffffff" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
57 <img src="img/topleft-inner.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
58 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
59 <td bgcolor="#ffffff">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
60 <img src="img/clear.png" width="1" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
61 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
62 <td align="right" bgcolor="#ffffff" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
63 <img src="img/topright-inner.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
64 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
65
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
66 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
67 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
68 <td bgcolor="#ffffff">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
69 <img src="img/clear.png" width="10" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
70 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
71 <td valign="top" width="99%" bgcolor="white" class="css_prison">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
72 <!-- end main body row -->
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
73 <h1><%= escape(description) %></h1>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
74 <%= header %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
75 <table class="statustable">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
76 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
77 <th class="statustablehead">Status</th>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
78 <th class="statustablehead">Package</th>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
79 <th class="statustablehead">Revision</th>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
80 <th class="statustablehead">Start</th>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
81 <th class="statustablehead">Stop</th>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
82 <th class="statustablehead">Duration</th>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
83 <th class="statustablehead">Notes</th>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
84 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
85 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
86
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
87 def nn(s, d=""):
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
88 if not s: return d
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
89 return escape(s)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
90
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
91 def pretty_time(t, format="%H:%M:%S"):
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
92 if not t: return "&lt;unknown&gt;"
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
93 return t.strftime(format)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
94
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
95 def pretty_timedelta(a, b):
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
96 if a is None or b is None: return "&lt;unknown&gt;"
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
97 td = a - b
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
98 secs = td.days * 24*3600 + td.seconds
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
99 out = []
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
100 if secs > 3600:
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
101 hs = secs // 3600
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
102 out.append("%dh" % hs)
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
103 secs %= 3600
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
104 if secs > 60:
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
105 ms = secs // 60
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
106 out.append("%dm" % ms)
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
107 secs %= 60
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
108 if secs > 0 or not out:
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
109 out.append("%ds" % secs)
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
110 return " ".join(out)
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
111
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
112 def date_from_datetime(x):
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
113 if not x: return None
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
114 return date(x.year, x.month, x.day)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
115
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
116 def sort_by_start(a, b):
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
117 a_start = a.build_start
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
118 b_start = b.build_start
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
119 if not a_start and not b_start: return 0
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
120 if not a_start: return 1
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
121 if not b_start: return -1
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
122 return cmp(a_start, b_start)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
123
474
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
124 def create_tags_link(tag_url):
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
125 return quoteattr(tag_url.replace(
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
126 "svn://anonsvn.kde.org/home/kde",
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
127 "http://websvn.kde.org"))
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
128
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
129 track_items = sorted(track_items, cmp=sort_by_start, reverse=True)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
130
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
131 last_date = None
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
132
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
133 STATUS2CLASS = {
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
134 'creating_binary_package': 'inprogress',
468
0cbf154431db recognize more build states in sawmill
Sascha Teichmann <teichmann@intevation.de>
parents: 460
diff changeset
135 'creating_source_package': 'inprogress',
472
d760c6cd2abf Source package created means we are still progressing
Andre Heinecke <aheinecke@intevation.de>
parents: 468
diff changeset
136 'source_package_created': 'inprogress',
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
137 'binary_package_created': 'finished'
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
138 }
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
139
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
140 STATUS2MSG = {
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
141 'creating_binary_package': 'building binary packages',
468
0cbf154431db recognize more build states in sawmill
Sascha Teichmann <teichmann@intevation.de>
parents: 460
diff changeset
142 'creating_source_package': 'building source package',
472
d760c6cd2abf Source package created means we are still progressing
Andre Heinecke <aheinecke@intevation.de>
parents: 468
diff changeset
143 'source_package_created': 'preparing build envrionment',
d760c6cd2abf Source package created means we are still progressing
Andre Heinecke <aheinecke@intevation.de>
parents: 468
diff changeset
144 'binary_package_created': 'build successful'
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
145 }
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
146
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
147 for track_item in track_items:
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
148 # for all track items
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
149 curr_date = date_from_datetime(track_item.build_start)
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
150 if curr_date != last_date:
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
151 last_date = curr_date
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
152 %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
153 <tr class="date_row"><td colspan="6"><%= pretty_time(last_date, "%Y-%m-%d") %></td></tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
154 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
155 # date changed
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
156 %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
157 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>">
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
158 <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
159 <td style="font-weight:bold;"><%= nn(track_item.track) %></td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
160 <td align="right">
474
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
161 <%
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
162 tags = track_item.build_tags
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
163 if tags:
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
164 # a tag
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
165 %>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
166 <a href=<%= create_tags_link(tags) %>><strong><%= nn(track_item.revision) %></strong></a>
474
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
167 <%
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
168 else:
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
169 # not a tag
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
170 %>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
171 <%= nn(track_item.revision) %>
474
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
172 <%
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
173 # end if tags
a8f77807d710 sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents: 473
diff changeset
174 %>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
175 </td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
176 <td align="right"><%= pretty_time(track_item.build_start) %></td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
177 <td align="right"><%= pretty_time(track_item.build_stop) %></td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
178 <td align="right"><%= pretty_timedelta(track_item.stop, track_item.build_start) %></td>
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
179 <td>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
180 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
181 for log_desc, log_path in track_item.build_logs:
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
182 # for all logs
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
183 %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
184 [<a href=<%= quoteattr("%s/%s" % (base_dir, log_path)) %>><%= nn(log_desc) %></a>]
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
185 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
186 # for all logs
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
187 %>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
188 </td>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
189 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
190 <%
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
191 # for all track itemes
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
192 %>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
193
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
194 </table>
475
7be221f41f58 sawmill: Added 'powered by Tree Packager' line in details view.
Sascha Teichmann <teichmann@intevation.de>
parents: 474
diff changeset
195 <hr>
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
196 report generated at <%= pretty_time(datetime.now(), "%Y-%m-%d %H:%M:%S") %>, powered
475
7be221f41f58 sawmill: Added 'powered by Tree Packager' line in details view.
Sascha Teichmann <teichmann@intevation.de>
parents: 474
diff changeset
197 by <a href="http://treepkg.wald.intevation.org">Tree Packager</a>
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
198
478
7504ed4437e1 sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents: 477
diff changeset
199
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
200 <!-- end main body row -->
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
201 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
202 <td width="10" bgcolor="#ffffff">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
203 <img src="img/clear.png" width="2" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
204 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
205 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
206
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
207 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
208 <td align="left" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
209 <img src="img/bottomleft-inner.png" height="11" width="11" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
210 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
211 <td bgcolor="#ffffff">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
212 <img src="img/clear.png" width="1" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
213 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
214 <td align="right" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
215 <img src="img/bottomright-inner.png" height="11" width="11" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
216
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
217 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
218 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
219 </table>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
220
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
221 <!-- end inner body row -->
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
222
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
223 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
224 <td width="10" bgcolor="#E0E0E0">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
225 <img src="img/clear.png" width="2" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
226 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
227
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
228 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
229 <tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
230 <td align="left" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
231 <img src="img/bottomleft.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
232 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
233 <td bgcolor="#E0E0E0" colspan="3">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
234 <img src="img/clear.png" width="1" height="1" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
235 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
236 <td align="right" bgcolor="#E0E0E0" width="9">
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
237
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
238 <img src="img/bottomright.png" height="9" width="9" alt="" />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
239 </td>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
240 </tr>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
241 </table>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
242 <br />
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
243 <center>
473
d8012571f9e1 sawmill: removed trailing whitespace
Sascha Teichmann <teichmann@intevation.de>
parents: 472
diff changeset
244 <b style="color:white; font-size:13px;">
452
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
245 This site is hosted by the <a href="http://www.intevation.de">Intevation GmbH</a>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
246 </b>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
247 </center>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
248
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
249 </body>
333232953771 Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff changeset
250 </html>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)