1 try:
2 from string import Template
3 except ImportError:
4 from buildbot.stringTemplate import Template
5
6
7 top_header = Template('''
8 <div align="center">
9 <table width=95% class="Grid" border="0" cellspacing="0">
10 ''')
11
12 top_info_name = Template('''
13 <tr>
14 <td width=33% align=left class=left_align><a href="$projectUrl">$projectName</a>
15 ''')
16
17 top_info_categories = Template('''
18 <br><b>Categories:</b> $categories
19 ''')
20
21 top_info_branch = Template('''
22 <br /><b>Branch:</b> $branch
23 ''')
24
25 top_info_name_end = Template('''
26 </td>
27 ''')
28
29 top_legend = Template('''
30 <td width=33% align=center class=center_align>
31 <div align="center">
32 <table>
33 <tr>
34 <td>Legend: </td>
35 <td><div class='legend success' title='All tests passed'>Passed</div></td>
36 <td><div class='legend failure' title='There is a new failure. Take a look!'>Failed</div></td>
37 <td><div class='legend warnings' title='It was failing before, and it is still failing. Make sure you did not introduce new regressions'>Failed Again</div></td>
38 <td><div class='legend running' title='The tests are still running'>Running</div></td>
39 <td><div class='legend exception' title='Something went wrong with the test, there is no result'>Exception</div></td>
40 <td><div class='legend notstarted' title='No result yet.'>No data</div></td>
41 </tr>
42 </table>
43 </div>
44 </td>
45 ''')
46
47 top_personalize = Template('''
48 <td width=33% align=right class=right_align>
49 <script>
50 function reload_page() {
51 name_value = document.getElementById('namebox').value
52 if (document.location.href.lastIndexOf('?') == -1)
53 document.location.href = document.location.href+ '?name=' + name_value;
54 else
55 document.location.href = document.location.href+ '&name=' + name_value;
56 }
57 </script>
58 <input id='namebox' name='name' type='text' style='color:#999;'
59 onblur='this.value = this.value || this.defaultValue; this.style.color = "#999";'
60 onfocus='this.value=""; this.style.color = "#000";'
61 value='Personalized for...'>
62
63 <input type=submit value='Go' onclick='reload_page()'>
64 </td>
65 ''')
66
67 top_footer = Template('''
68 </tr>
69 </table>
70 </div>
71 ''')
72
73 main_header = Template('''
74 <br>
75 <div align="center">
76 <table width=96%>
77 ''')
78
79 main_line_category_header = Template('''
80 <tr>
81 <td width="1%">
82 </td>
83 <td width="1%">
84 </td>
85 ''')
86
87 main_line_category_name = Template('''
88 <td class='DevStatus $alt $first $last' width=$size%>
89 $category
90 </td>
91 ''')
92
93 main_line_category_footer = Template('''
94 </tr>
95 <tr class='DevStatusSpacing'>
96 </tr>
97 ''')
98
99 main_line_info = Template('''
100 <tr>
101 <td class='DevRev $alt' width="1%">
102 $revision_link
103 </td>
104 <td class='DevName $alt' width="1%">
105 $who
106 </td>
107 ''')
108
109 main_line_slave_header = Template('''
110 <tr>
111 <td width="1%">
112 </td>
113 <td width="1%">
114 </td>
115 <td class='DevSlave $alt'>
116 <table width="100%">
117 <tr>
118 ''')
119
120 main_line_slave_section = Template('''
121 </tr>
122 </table>
123 </td>
124 <td class='DevSlave $alt'>
125 <table width="100%">
126 <tr>
127 ''')
128
129 main_line_slave_status = Template('''
130 <td class='DevSlaveBox'>
131 <a href='$url' title='$title' class='DevSlaveBox $color' target=_blank>
132 </a>
133 </td>
134 ''')
135
136 main_line_slave_footer = Template('''
137 </tr>
138 </table>
139 </td>
140 </tr>
141 ''')
142
143 main_line_status_header = Template('''
144 <td class='DevStatus $alt $last'>
145 <table width="100%">
146 <tr>
147 ''')
148
149 main_line_status_section = Template('''
150 </tr>
151 </table>
152 </td>
153 <td class='DevStatus $alt $last'>
154 <table width="100%">
155 <tr>
156 ''')
157
158 main_line_status_box = Template('''
159 <td class='DevStatusBox'>
160 <a href='#' onClick='showBuildBox("$url", event); return false;' title='$title' class='DevStatusBox $color $tag' target=_blank></a>
161 </td>
162 ''')
163
164 main_line_status_footer = Template('''
165 </tr>
166 </table>
167 </td>
168 </tr>
169 ''')
170
171 main_line_details = Template('''
172 <tr>
173 <td colspan=$span class='DevDetails $alt'>
174 <ul style='margin: 0px; padding: 1em;'>
175 $details
176 </ul>
177 </td>
178 </tr>
179 ''')
180
181 main_line_comments = Template('''
182 <tr>
183 <td colspan=$span class='DevComment $alt'> $comments </td>
184 </tr>
185 <tr class='DevStatusSpacing'>
186 <td>
187 </td>
188 </tr>
189 ''')
190
191 main_footer = Template('''
192 </table>
193 </div>
194 ''')
195
196
197 bottom = Template('''
198 <hr />
199
200 <div class="footer">
201 [ <a href="$welcomeUrl">welcome</a> ]
202 <br />
203 <a href="http://buildbot.sourceforge.net/">Buildbot - $version</a> working for the <a href="$projectUrl"> $projectName </a> project.
204 <br />
205 Page built: $time
206 <br />
207 Debug Info: $debugInfo
208 </div>
209
210 <div id="divBox" OnMouseOut="if (checkMouseLeave(this, event)) this.style.display = 'None'" class="BuildWaterfall">
211 </div>
212 <iframe id="frameBox" style="display: none;" onload="updateDiv(event);"></iframe>
213 ''')
214