HTML report: link to summary matrix
[ci.git] / hbuild / web / report.xsl
blob0c5222246de7ac1a66669c4251b664f1e64c693d
1 <!--
2 - Copyright (c) 2017 Vojtech Horky
3 - All rights reserved.
5 - Redistribution and use in source and binary forms, with or without
6 - modification, are permitted provided that the following conditions
7 - are met:
9 - - Redistributions of source code must retain the above copyright
10 - notice, this list of conditions and the following disclaimer.
11 - - Redistributions in binary form must reproduce the above copyright
12 - notice, this list of conditions and the following disclaimer in the
13 - documentation and/or other materials provided with the distribution.
14 - - The name of the author may not be used to endorse or promote products
15 - derived from this software without specific prior written permission.
17 - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 -->
28 <xsl:stylesheet version="1.0"
29 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
30 xmlns="http://www.w3.org/1999/xhtml">
32 <xsl:import href="common.xsl" />
34 <xsl:output
35 method="xml"
36 indent="yes"
37 omit-xml-declaration="yes"
38 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
39 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
42 <xsl:key name="by-arch" match="/build/*" use="@arch" />
43 <xsl:key name="by-harbour" match="/build/*" use="@package" />
44 <xsl:key name="by-scenario" match="/build/*" use="@scenario" />
46 <xsl:variable name="LINK_TO_TOP">
47 <span class="back-to-top"><a href="#top-of-page">(back to top)</a></span>
48 </xsl:variable>
51 <xsl:template match="build">
52 <xsl:variable name="BUILD" select="." />
53 <xsl:call-template name="HTML_PAGE">
54 <xsl:with-param name="TITLE">
55 <xsl:text>HelenOS CI (build </xsl:text>
56 <xsl:value-of select="@number" />
57 <xsl:text>)</xsl:text>
58 </xsl:with-param>
59 <xsl:with-param name="EXTRA_HEAD">
60 <script type="text/javascript" language="JavaScript">
61 $( document ).ready(function() {
62 $(".logdump").hide();
63 });
64 function showHideLog(link, target) {
65 target = $(link).parents("table").find("." + target)
66 if (target.is(":hidden")) {
67 target.show();
68 $(link).text("hide");
69 } else {
70 target.hide();
71 $(link).text("tail");
73 return false;
75 </script>
76 </xsl:with-param>
77 <xsl:with-param name="BODY">
78 <div id="centeredd">
80 <h1 id="top-of-page">HelenOS continuous integration testing</h1>
81 <h2 id="build-info">
82 Build <xsl:value-of select="@number" /> from <xsl:value-of select="buildinfo/@started" />
83 (<xsl:apply-templates select="buildinfo" mode="duration" />)
84 </h2>
85 <div id="summary">
86 <h2>Summary results</h2>
87 <xsl:apply-templates select="." mode="html-summary-table" />
88 </div>
90 <div id="quick-links" class="buttonset">
91 <h2>Quick links</h2>
93 <div class="quick-link-group">
94 <h3>Miscellaneous</h3>
95 <ul>
96 <li><a href="#matrix">Summary matrix</a></li>
97 <li><a href="#failures">List of failed tasks</a></li>
98 <xsl:if test="helenos-build">
99 <li><a href="#helenos">HelenOS</a></li>
100 </xsl:if>
101 </ul>
102 </div>
104 <xsl:if test="count(*[@arch]) &gt; 0">
105 <div class="quick-link-group">
106 <h3>Architectures</h3>
107 <ul>
108 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
109 <xsl:sort select="@arch" />
110 <xsl:variable name="ARCH" select="@arch" />
111 <li><a href="#arch-{$ARCH}"><xsl:value-of select="$ARCH" /></a></li>
112 </xsl:for-each>
113 </ul>
114 </div>
115 </xsl:if>
117 <xsl:if test="count(*[@package]) &gt; 0">
118 <div class="quick-link-group">
119 <h3>Harbours</h3>
120 <ul>
121 <xsl:for-each select="*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
122 <xsl:sort select="@package" />
123 <xsl:variable name="PKG" select="@package" />
124 <li><a href="#harbour-{$PKG}"><xsl:value-of select="$PKG" /></a></li>
125 </xsl:for-each>
126 </ul>
127 </div>
128 </xsl:if>
130 <xsl:if test="count(*[@scenario]) &gt; 0">
131 <div class="quick-link-group">
132 <h3>Testing scenarios</h3>
133 <ul>
134 <xsl:for-each select="*[@scenario and count(. | key('by-scenario', @scenario)[parent::build = $BUILD][1]) = 1]">
135 <xsl:sort select="@scenario" />
136 <xsl:variable name="SCENARIO" select="@scenario" />
137 <li><a href="#scenario-{$SCENARIO}"><xsl:value-of select="$SCENARIO" /></a></li>
138 </xsl:for-each>
139 </ul>
140 </div>
141 </xsl:if>
143 </div>
145 <h2 id="matrix">Summary matrix<xsl:copy-of select="$LINK_TO_TOP" /></h2>
146 <table class="matrix">
147 <thead>
148 <tr>
149 <th></th>
150 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
151 <xsl:sort select="@arch" />
152 <th>
153 <xsl:apply-templates select="@arch" mode="architecture-with-hyphens" />
154 </th>
155 </xsl:for-each>
156 </tr>
157 </thead>
158 <tbody>
159 <tr>
160 <th>HelenOS</th>
161 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
162 <xsl:sort select="@arch" />
163 <xsl:variable name="ARCH" select="@arch" />
164 <xsl:variable name="RESULT" select="//helenos-build[@arch=$ARCH]" />
165 <td class="result-{$RESULT/@result}"><xsl:apply-templates select="$RESULT" mode="log-link-matrix" /></td>
166 </xsl:for-each>
167 </tr>
168 <xsl:for-each select="*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
169 <xsl:sort select="@package" />
170 <xsl:variable name="PKG" select="@package" />
171 <tr>
172 <th><xsl:value-of select="$PKG" /></th>
173 <xsl:for-each select="//*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
174 <xsl:sort select="@arch" />
175 <xsl:variable name="ARCH" select="@arch" />
176 <xsl:variable name="RESULT" select="//harbour-build[@arch=$ARCH and @package=$PKG]" />
177 <xsl:choose>
178 <xsl:when test="$RESULT">
179 <td class="result-{$RESULT/@result}"><xsl:apply-templates select="$RESULT" mode="log-link-matrix" /></td>
180 </xsl:when>
181 <xsl:otherwise>
182 <td class="result-na">N/A</td>
183 </xsl:otherwise>
184 </xsl:choose>
185 </xsl:for-each>
186 </tr>
187 </xsl:for-each>
188 </tbody>
189 </table>
191 <h2>Miscellaneous</h2>
192 <h3 id="failures">List of failed tasks <xsl:copy-of select="$LINK_TO_TOP" /></h3>
193 <xsl:choose>
194 <xsl:when test="count(*[@result='fail']) = 0">
195 <p>There were no failures.</p>
196 </xsl:when>
197 <xsl:otherwise>
198 <table>
199 <thead>
200 <tr>
201 <th width="25%">Task</th>
202 <th width="25%">Component</th>
203 <th width="20%">Architecture</th>
204 <th width="20%">Log</th>
205 <th width="10%">Duration</th>
206 </tr>
207 </thead>
208 <tbody>
209 <xsl:for-each select="checkout[@result='fail']">
210 <xsl:sort select="@repository" />
211 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
212 </xsl:for-each>
213 <xsl:apply-templates select="harbour-check[@result='fail']" mode="html-failed-task-table-row" />
214 <xsl:for-each select="helenos-build[@result='fail']">
215 <xsl:sort select="@arch" />
216 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
217 </xsl:for-each>
218 <xsl:for-each select="harbour-fetch[@result='fail']">
219 <xsl:sort select="@package" />
220 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
221 </xsl:for-each>
222 <xsl:for-each select="harbour-build[@result='fail']">
223 <xsl:sort select="@package" />
224 <xsl:sort select="@arch" />
225 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
226 </xsl:for-each>
227 <xsl:for-each select="helenos-extra-build[@result='fail']">
228 <xsl:sort select="@arch" />
229 <xsl:sort select="@packages" />
230 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
231 </xsl:for-each>
232 <xsl:for-each select="test[@result='fail']">
233 <xsl:sort select="@scenario" />
234 <xsl:sort select="@arch" />
235 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
236 </xsl:for-each>
237 <!-- xsl:apply-templates select="*[@result='fail']" mode="html-failed-task-table-row" /-->
238 </tbody>
239 </table>
240 </xsl:otherwise>
241 </xsl:choose>
243 <xsl:if test="helenos-build">
244 <h3 id="helenos">HelenOS <xsl:copy-of select="$LINK_TO_TOP" /></h3>
245 <table>
246 <thead>
247 <tr>
248 <th width="25%">Architecture</th>
249 <th width="10%">Result</th>
250 <th width="35%">Download</th>
251 <th width="20%">Log</th>
252 <th width="10%">Duration</th>
253 </tr>
254 </thead>
255 <tbody>
256 <xsl:for-each select="helenos-build">
257 <xsl:sort select="@arch" />
258 <tr class="result-{@result}">
259 <td>
260 <xsl:value-of select="@arch" />
261 </td>
262 <td>
263 <xsl:apply-templates select="." mode="yes-no" />
264 </td>
265 <td>
266 <xsl:apply-templates select="." mode="download" />
267 </td>
268 <td>
269 <xsl:apply-templates select="." mode="log-link" />
270 </td>
271 <td>
272 <xsl:apply-templates select="." mode="duration" />
273 </td>
274 </tr>
275 <xsl:apply-templates select="." mode="log-dump" />
276 </xsl:for-each>
277 </tbody>
278 </table>
279 </xsl:if>
282 <xsl:if test="count(*[@arch]) &gt; 0">
283 <h2>Per-architecture details <xsl:copy-of select="$LINK_TO_TOP" /></h2>
284 <xsl:for-each select="$BUILD/*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
285 <xsl:sort select="@arch" />
286 <xsl:variable name="ARCH" select="@arch" />
287 <h3 id="arch-{$ARCH}"><xsl:value-of select="$ARCH" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
288 <table>
289 <thead>
290 <tr>
291 <th width="25%">Task</th>
292 <th width="10%">Result</th>
293 <th width="35%">Download</th>
294 <th width="20%">Log</th>
295 <th width="10%">Duration</th>
296 </tr>
297 </thead>
298 <tbody>
299 <tr class="result-{$BUILD/helenos-build[@arch=$ARCH]/@result}">
300 <td>HelenOS</td>
301 <td>
302 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="yes-no" />
303 </td>
304 <td>
305 <xsl:apply-templates select="." mode="download" />
306 </td>
307 <td>
308 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="log-link" />
309 </td>
310 <td>
311 <xsl:apply-templates select="." mode="duration" />
312 </td>
313 </tr>
314 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="log-dump" />
315 <xsl:for-each select="$BUILD/harbour-build[@arch=$ARCH]">
316 <tr class="result-{@result}">
317 <td><xsl:value-of select="@package" /></td>
318 <td>
319 <xsl:apply-templates select="." mode="yes-no" />
320 </td>
321 <td>
322 <xsl:apply-templates select="." mode="download" />
323 </td>
324 <td>
325 <xsl:apply-templates select="." mode="log-link" />
326 </td>
327 <td>
328 <xsl:apply-templates select="." mode="duration" />
329 </td>
330 </tr>
331 <xsl:apply-templates select="." mode="log-dump" />
332 </xsl:for-each>
333 <xsl:for-each select="$BUILD/helenos-extra-build[@arch=$ARCH]">
334 <tr class="result-{@result}">
335 <td>HelenOS with <xsl:value-of select="@harbours" /></td>
336 <td>
337 <xsl:apply-templates select="." mode="yes-no" />
338 </td>
339 <td>
340 <xsl:apply-templates select="." mode="download" />
341 </td>
342 <td>
343 <xsl:apply-templates select="." mode="log-link" />
344 </td>
345 <td>
346 <xsl:apply-templates select="." mode="duration" />
347 </td>
348 </tr>
349 <xsl:apply-templates select="." mode="log-dump" />
350 </xsl:for-each>
351 <xsl:for-each select="$BUILD/test[@arch=$ARCH]">
352 <tr class="result-{@result}">
353 <td><xsl:value-of select="@scenario" /></td>
354 <td>
355 <xsl:apply-templates select="." mode="yes-no" />
356 </td>
357 <td>
358 <xsl:apply-templates select="." mode="download" />
359 </td>
360 <td>
361 <xsl:apply-templates select="." mode="log-link" />
362 </td>
363 <td>
364 <xsl:apply-templates select="." mode="duration" />
365 </td>
366 </tr>
367 <xsl:apply-templates select="." mode="log-dump" />
368 </xsl:for-each>
369 </tbody>
370 </table>
371 </xsl:for-each>
372 </xsl:if>
374 <xsl:if test="count(*[@package]) &gt; 0">
375 <h2>Per-harbour details<xsl:copy-of select="$LINK_TO_TOP" /></h2>
376 <xsl:for-each select="$BUILD/*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
377 <xsl:sort select="@package" />
378 <xsl:variable name="PKG" select="@package" />
379 <h3 id="harbour-{$PKG}"><xsl:value-of select="$PKG" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
380 <table>
381 <thead>
382 <tr>
383 <th width="25%">Architecture</th>
384 <th width="10%">Result</th>
385 <th width="35%">Download</th>
386 <th width="20%">Log</th>
387 <th width="10%">Duration</th>
388 </tr>
389 </thead>
390 <tbody>
391 <tr class="result-{$BUILD/harbour-fetch[@package=$PKG]/@result}">
392 <td><i>Tarball fetch</i></td>
393 <td>
394 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="yes-no" />
395 </td>
396 <td>
397 <xsl:apply-templates select="." mode="download" />
398 </td>
399 <td>
400 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="log-link" />
401 </td>
402 <td>
403 <xsl:apply-templates select="." mode="duration" />
404 </td>
405 </tr>
406 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="log-dump" />
407 <xsl:for-each select="$BUILD/harbour-build[@package=$PKG]">
408 <xsl:sort select="@arch" />
409 <tr class="result-{@result}">
410 <td><xsl:value-of select="@arch" /></td>
411 <td>
412 <xsl:apply-templates select="." mode="yes-no" />
413 </td>
414 <td>
415 <xsl:apply-templates select="." mode="download" />
416 </td>
417 <td>
418 <xsl:apply-templates select="." mode="log-link" />
419 </td>
420 <td>
421 <xsl:apply-templates select="." mode="duration" />
422 </td>
423 </tr>
424 <xsl:apply-templates select="." mode="log-dump" />
425 </xsl:for-each>
426 </tbody>
427 </table>
428 </xsl:for-each>
429 </xsl:if>
431 <xsl:if test="count(*[@scenario]) &gt; 0">
432 <h2>Per-scenario details<xsl:copy-of select="$LINK_TO_TOP" /></h2>
433 <xsl:for-each select="$BUILD/*[@scenario and count(. | key('by-scenario', @scenario)[parent::build = $BUILD][1]) = 1]">
434 <xsl:sort select="@scenario" />
435 <xsl:variable name="SCENARIO" select="@scenario" />
436 <h3 id="scenario-{$SCENARIO}"><xsl:value-of select="$SCENARIO" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
437 <table>
438 <thead>
439 <tr>
440 <th width="25%">Architecture</th>
441 <th width="10%">Result</th>
442 <th width="35%">Download</th>
443 <th width="20%">Log</th>
444 <th width="10%">Duration</th>
445 </tr>
446 </thead>
447 <tbody>
448 <xsl:for-each select="$BUILD/test[@scenario=$SCENARIO]">
449 <xsl:sort select="@arch" />
450 <tr class="result-{@result}">
451 <td><xsl:value-of select="@arch" /></td>
452 <td>
453 <xsl:apply-templates select="." mode="yes-no" />
454 </td>
455 <td>
456 <xsl:apply-templates select="." mode="download" />
457 </td>
458 <td>
459 <xsl:apply-templates select="." mode="log-link" />
460 </td>
461 <td>
462 <xsl:apply-templates select="." mode="duration" />
463 </td>
464 </tr>
465 <xsl:apply-templates select="." mode="log-dump" />
466 </xsl:for-each>
467 </tbody>
468 </table>
469 </xsl:for-each>
470 </xsl:if>
472 </div>
474 </xsl:with-param>
475 </xsl:call-template>
476 </xsl:template>
478 <xsl:template match="@*" mode="architecture-with-hyphens">
479 <xsl:variable name="PLATFORM" select="substring-before(., '/')" />
480 <xsl:variable name="MACHINE" select="substring-after(., '/')" />
481 <xsl:choose>
482 <xsl:when test="concat($PLATFORM, $MACHINE) = ''">
483 <xsl:value-of select="." />
484 </xsl:when>
485 <xsl:otherwise>
486 <xsl:value-of select="$PLATFORM" />
487 <xsl:text> </xsl:text>
488 <xsl:choose>
489 <xsl:when test="$MACHINE = 'beagleboardxm'">
490 <xsl:text disable-output-escaping="yes"><![CDATA[beagle&shy;board&shy;xm]]></xsl:text>
491 </xsl:when>
492 <xsl:when test="$MACHINE = 'beaglebone'">
493 <xsl:text disable-output-escaping="yes"><![CDATA[beagle&shy;bone]]></xsl:text>
494 </xsl:when>
495 <xsl:when test="$MACHINE = 'malta-be'">
496 <xsl:text disable-output-escaping="yes"><![CDATA[malta&shy;-be]]></xsl:text>
497 </xsl:when>
498 <xsl:when test="$MACHINE = 'malta-le'">
499 <xsl:text disable-output-escaping="yes"><![CDATA[malta&shy;-le]]></xsl:text>
500 </xsl:when>
501 <xsl:when test="$MACHINE = 'integratorcp'">
502 <xsl:text disable-output-escaping="yes"><![CDATA[inte&shy;gra&shy;torcp]]></xsl:text>
503 </xsl:when>
504 <xsl:when test="$MACHINE = 'raspberrypi'">
505 <xsl:text disable-output-escaping="yes"><![CDATA[rasp&shy;ber&shy;ry&shy;pi]]></xsl:text>
506 </xsl:when>
507 <xsl:when test="$MACHINE = 'raspberrypi'">
508 <xsl:text disable-output-escaping="yes"><![CDATA[rasp&shy;ber&shy;ry&shy;pi]]></xsl:text>
509 </xsl:when>
510 <xsl:otherwise>
511 <xsl:value-of select="$MACHINE" />
512 </xsl:otherwise>
513 </xsl:choose>
514 </xsl:otherwise>
515 </xsl:choose>
516 </xsl:template>
518 <xsl:template match="*" mode="yes-no">
519 <xsl:choose>
520 <xsl:when test="@result = 'ok'">
521 <xsl:text>OK</xsl:text>
522 </xsl:when>
523 <xsl:when test="@result = 'fail'">
524 <xsl:text>Failed</xsl:text>
525 </xsl:when>
526 <xsl:when test="@result = 'skip'">
527 <xsl:text>Skipped</xsl:text>
528 </xsl:when>
529 <xsl:otherwise>
530 <xsl:text>? </xsl:text>
531 <code>(<xsl:value-of select="@result" />)</code>
532 </xsl:otherwise>
533 </xsl:choose>
534 </xsl:template>
536 <xsl:template match="*" mode="image-link">
537 <xsl:if test="@image">
538 <a href="{@image}">Image</a>
539 </xsl:if>
540 </xsl:template>
542 <xsl:template match="*" mode="log-link">
543 <xsl:if test="@log">
544 <a href="{@log}">View</a>
545 <xsl:if test="log/logline">
546 (<a href="#" onclick="return showHideLog(this, 'log-{generate-id(.)}');">tail</a>)
547 </xsl:if>
548 </xsl:if>
549 </xsl:template>
551 <xsl:template match="*" mode="log-link-matrix">
552 <xsl:if test="@log">
553 <a href="{@log}"><xsl:apply-templates select="." mode="yes-no" /></a>
554 </xsl:if>
555 </xsl:template>
557 <xsl:template match="*" mode="duration">
558 <xsl:if test="@duration">
559 <xsl:variable name="SECONDS" select="@duration div 1000" />
560 <xsl:variable name="MINUTES" select="floor($SECONDS div 60)" />
561 <xsl:variable name="HOURS" select="floor($MINUTES div 60)" />
562 <xsl:choose>
563 <xsl:when test="$MINUTES &gt; 90">
564 <xsl:value-of select="$HOURS" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>h </xsl:text>
565 <xsl:value-of select="format-number($MINUTES - 60 * $HOURS, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>min</xsl:text>
566 </xsl:when>
567 <xsl:when test="$SECONDS &gt; 90">
568 <xsl:value-of select="$MINUTES" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>min </xsl:text>
569 <xsl:value-of select="format-number($SECONDS - 60 * $MINUTES, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>s</xsl:text>
570 </xsl:when>
571 <xsl:otherwise>
572 <xsl:value-of select="format-number($SECONDS, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>s</xsl:text>
573 </xsl:otherwise>
574 </xsl:choose>
575 <!-- (<xsl:value-of select="format-number(@duration div 1000, '#.00')" />s) -->
576 </xsl:if>
577 </xsl:template>
579 <xsl:template match="*" mode="log-dump">
580 <xsl:if test="count(log/logline) > 0">
581 <tr class="logdump log-{generate-id(.)}">
582 <td colspan="5">
583 <pre><xsl:for-each select="log/logline">
584 <xsl:value-of select="text()" /><xsl:text>
585 </xsl:text>
586 </xsl:for-each></pre>
587 </td>
588 </tr>
589 </xsl:if>
590 </xsl:template>
592 <xsl:template match="*" mode="download">
593 <xsl:for-each select="file">
594 <a href="{@filename}"><xsl:value-of select="@title" /></a>
595 <xsl:if test="not(last())">, </xsl:if>
596 </xsl:for-each>
597 <xsl:if test="not(file)">
598 <xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text>
599 </xsl:if>
600 </xsl:template>
604 <xsl:template match="*" mode="html-failed-task-table-row">
605 <tr class="result-fail">
606 <xsl:apply-templates select="." mode="html-failed-task-table-row-inner" />
607 <td>
608 <xsl:apply-templates select="." mode="log-link" />
609 </td>
610 <td>
611 <xsl:apply-templates select="." mode="duration" />
612 </td>
613 </tr>
614 <xsl:apply-templates select="." mode="log-dump" />
615 </xsl:template>
617 <xsl:template match="checkout" mode="html-failed-task-table-row-inner">
618 <td>Repository checkout</td>
619 <td><xsl:value-of select="@repository" /></td>
620 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
621 </xsl:template>
623 <xsl:template match="harbour-check" mode="html-failed-task-table-row-inner">
624 <td>Harbour self-check</td>
625 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
626 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
627 </xsl:template>
629 <xsl:template match="harbour-fetch" mode="html-failed-task-table-row-inner">
630 <td>Tarball fetch</td>
631 <td><xsl:value-of select="@package" /></td>
632 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
633 </xsl:template>
635 <xsl:template match="helenos-build" mode="html-failed-task-table-row-inner">
636 <td>HelenOS</td>
637 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
638 <td><xsl:value-of select="@arch" /></td>
639 </xsl:template>
641 <xsl:template match="harbour-build" mode="html-failed-task-table-row-inner">
642 <td>Harbour build</td>
643 <td><xsl:value-of select="@package" /></td>
644 <td><xsl:value-of select="@arch" /></td>
645 </xsl:template>
647 <xsl:template match="helenos-extra-build" mode="html-failed-task-table-row-inner">
648 <td>Extras build</td>
649 <td>HelenOS and <xsl:value-of select="@packages" /></td>
650 <td><xsl:value-of select="@arch" /></td>
651 </xsl:template>
653 <xsl:template match="test" mode="html-failed-task-table-row-inner">
654 <td>Test in VM</td>
655 <td><xsl:value-of select="@scenario" /></td>
656 <td><xsl:value-of select="@arch" /></td>
657 </xsl:template>
659 <xsl:template match="*" mode="html-failed-task-table-row-inner">
660 <td><xsl:value-of select="name()" /></td>
661 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
662 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
663 </xsl:template>
665 </xsl:stylesheet>