Mercurial > treepkg
annotate contrib/sawmill/web/templates/details.html @ 482:a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
make it more readable.
author | Sascha Teichmann <teichmann@intevation.de> |
---|---|
date | Sat, 18 Sep 2010 08:01:18 +0000 |
parents | 9c7e1d957d6b |
children | 28aa6ac933fb |
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 |
482
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
8 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
9 def nn(s, d=""): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
10 if not s: return d |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
11 return escape(s) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
12 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
13 def pretty_time(t, format="%H:%M:%S"): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
14 if not t: return "<unknown>" |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
15 return t.strftime(format) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
16 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
17 def pretty_timedelta(a, b): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
18 if a is None or b is None: return "<unknown>" |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
19 td = a - b |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
20 secs = td.days * 24*3600 + td.seconds |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
21 out = [] |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
22 if secs > 3600: |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
23 hs = secs // 3600 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
24 out.append("%dh" % hs) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
25 secs %= 3600 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
26 if secs > 60: |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
27 ms = secs // 60 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
28 out.append("%dm" % ms) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
29 secs %= 60 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
30 if secs > 0 or not out: |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
31 out.append("%ds" % secs) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
32 return " ".join(out) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
33 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
34 def date_from_datetime(x): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
35 if not x: return None |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
36 return date(x.year, x.month, x.day) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
37 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
38 def sort_by_start(a, b): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
39 a_start = a.build_start |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
40 b_start = b.build_start |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
41 if not a_start and not b_start: return 0 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
42 if not a_start: return 1 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
43 if not b_start: return -1 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
44 return cmp(a_start, b_start) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
45 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
46 def create_tags_link(tag_url): |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
47 return quoteattr(tag_url.replace( |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
48 "svn://anonsvn.kde.org/home/kde", |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
49 "http://websvn.kde.org")) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
50 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
51 track_items = sorted(track_items, cmp=sort_by_start, reverse=True) |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
52 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
53 last_date = None |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
54 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
55 STATUS2CLASS = { |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
56 'creating_binary_package': 'inprogress', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
57 'creating_source_package': 'inprogress', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
58 'source_package_created': 'inprogress', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
59 'binary_package_created': 'finished' |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
60 } |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
61 |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
62 STATUS2MSG = { |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
63 'creating_binary_package': 'building binary packages', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
64 'creating_source_package': 'building source package', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
65 'source_package_created': 'preparing build envrionment', |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
66 'binary_package_created': 'success' |
a89f73f7c965
sawmill: Rearranged the postion of some python code in the details template to
Sascha Teichmann <teichmann@intevation.de>
parents:
481
diff
changeset
|
67 } |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
68 %> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
69 <html> |
476
f3438708a2be
The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents:
475
diff
changeset
|
70 <head> |
f3438708a2be
The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents:
475
diff
changeset
|
71 <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
|
72 <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
|
73 <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
|
74 <title>Sägewerk - <%= escape(description) %></title> |
f3438708a2be
The beast is called Saegewerk and not Saegewerker
Sascha Teichmann <teichmann@intevation.de>
parents:
475
diff
changeset
|
75 </head> |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
76 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
77 <body> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
78 <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
|
79 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
80 <td> |
460
10d4cbffcc07
corrected link back to overview in detail view of sawmill
Sascha Teichmann <teichmann@intevation.de>
parents:
452
diff
changeset
|
81 <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
|
82 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
83 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
84 </table> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
85 <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
|
86 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
87 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
88 <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
|
89 <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
|
90 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
91 <td bgcolor="#E0E0E0" width="30"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
92 <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
|
93 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
94 <td bgcolor="#E0E0E0"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
95 <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
|
96 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
97 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
98 <td bgcolor="#E0E0E0" width="30"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
99 <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
|
100 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
101 <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
|
102 <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
|
103 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
104 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
105 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
106 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
107 <!-- Outer body row --> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
108 <td bgcolor="#E0E0E0"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
109 <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
|
110 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
111 <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
|
112 <!-- Inner Tabs / Shell --> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
113 <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
|
114 <tr> |
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 <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
|
117 <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
|
118 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
119 <td bgcolor="#ffffff"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
120 <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
|
121 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
122 <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
|
123 <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
|
124 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
125 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
126 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
127 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
128 <td bgcolor="#ffffff"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
129 <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
|
130 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
131 <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
|
132 <!-- end main body row --> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
133 <h1><%= escape(description) %></h1> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
134 <%= header %> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
135 <table class="statustable"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
136 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
137 <th class="statustablehead">Status</th> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
138 <th class="statustablehead">Package</th> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
139 <th class="statustablehead">Revision</th> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
140 <th class="statustablehead">Start</th> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
141 <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
|
142 <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
|
143 <th class="statustablehead">Notes</th> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
144 </tr> |
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 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
|
147 # for all track items |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
148 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
|
149 if curr_date != last_date: |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
150 last_date = curr_date |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
151 %> |
481
9c7e1d957d6b
sawmill: Not all displayed times are in UTC so the
Sascha Teichmann <teichmann@intevation.de>
parents:
480
diff
changeset
|
152 <tr class="date_row"><td colspan="6"><%= pretty_time(last_date, "%Y-%m-%d") %> (times in UTC)</td></tr> |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
153 <% |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
154 # date changed |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
155 %> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
156 <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
|
157 <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
|
158 <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
|
159 <td align="right"> |
474
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
160 <% |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
161 tags = track_item.build_tags |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
162 if tags: |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
163 # a tag |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
164 %> |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
165 <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
|
166 <% |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
167 else: |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
168 # not a tag |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
169 %> |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
170 <%= nn(track_item.revision) %> |
474
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
171 <% |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
172 # end if tags |
a8f77807d710
sawmill: create links for tag builds
Sascha Teichmann <teichmann@intevation.de>
parents:
473
diff
changeset
|
173 %> |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
174 </td> |
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
175 <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
|
176 <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
|
177 <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
|
178 <td> |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
179 <% |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
180 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
|
181 # for all logs |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
182 %> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
183 [<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
|
184 <% |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
185 # for all logs |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
186 %> |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
187 </td> |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
188 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
189 <% |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
190 # for all track itemes |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
191 %> |
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 </table> |
475
7be221f41f58
sawmill: Added 'powered by Tree Packager' line in details view.
Sascha Teichmann <teichmann@intevation.de>
parents:
474
diff
changeset
|
194 <hr> |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
195 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
|
196 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
|
197 |
478
7504ed4437e1
sawmill: short start and stop to %H:%M:%S because
Sascha Teichmann <teichmann@intevation.de>
parents:
477
diff
changeset
|
198 |
452
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
199 <!-- end main body row --> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
200 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
201 <td width="10" bgcolor="#ffffff"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
202 <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
|
203 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
204 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
205 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
206 <tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
207 <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
|
208 <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
|
209 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
210 <td bgcolor="#ffffff"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
211 <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
|
212 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
213 <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
|
214 <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
|
215 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
216 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
217 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
218 </table> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
219 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
220 <!-- end inner body row --> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
221 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
222 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
223 <td width="10" bgcolor="#E0E0E0"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
224 <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
|
225 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
226 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
227 </tr> |
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 <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
|
230 <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
|
231 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
232 <td bgcolor="#E0E0E0" colspan="3"> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
233 <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
|
234 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
235 <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
|
236 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
237 <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
|
238 </td> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
239 </tr> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
240 </table> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
241 <br /> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
242 <center> |
473
d8012571f9e1
sawmill: removed trailing whitespace
Sascha Teichmann <teichmann@intevation.de>
parents:
472
diff
changeset
|
243 <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
|
244 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
|
245 </b> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
246 </center> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
247 |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
248 </body> |
333232953771
Initial check-in of sawmill a simple mod_python based
Sascha Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
249 </html> |