2 - Copyright (c) 2017 Vojtech Horky
5 - Redistribution and use in source and binary forms, with or without
6 - modification, are permitted provided that the following conditions
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.
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 method=
"html" indent=
"yes" />
36 <xsl:param name=
"PREVIOUS_BUILDS" select=
"''" />
37 <xsl:param name=
"LAST_BUILD" select=
"''" />
39 <xsl:key name=
"by-arch" match=
"/build/*" use=
"@arch" />
40 <xsl:key name=
"by-harbour" match=
"/build/*" use=
"@package" />
41 <xsl:key name=
"by-scenario" match=
"/build/*" use=
"@scenario" />
43 <xsl:variable name=
"LINK_TO_TOP">
44 <span class=
"back-to-top"><a href=
"#top-of-page">(back to top)
</a></span>
48 <xsl:template match=
"build">
49 <xsl:variable name=
"BUILD" select=
"." />
50 <xsl:call-template name=
"HTML_PAGE">
51 <xsl:with-param name=
"TITLE">
52 <xsl:text>HelenOS CI
</xsl:text>
54 <xsl:with-param name=
"EXTRA_HEAD">
56 <xsl:with-param name=
"BODY">
59 <h1 id=
"top-of-page">HelenOS continuous integration testing
</h1>
62 <p class=
"action buttonset">
63 <a href=
"build-{$LAST_BUILD}/index.html">See details of this build.
</a>
65 <xsl:apply-templates select=
"." mode=
"html-summary-table" />
68 <xsl:if test=
"normalize-space($PREVIOUS_BUILDS) != ''">
69 <h2>Previous builds
</h2>
70 <ul class=
"previous-builds buttonset">
71 <xsl:call-template name=
"MAKE_LINKS_TO_PREVIOUS_BUILDS">
72 <xsl:with-param name=
"BUILDS" select=
"normalize-space($PREVIOUS_BUILDS)" />
82 <xsl:template name=
"MAKE_LINKS_TO_PREVIOUS_BUILDS">
83 <xsl:param name=
"BUILDS" />
84 <xsl:variable name=
"FIRST">
86 <xsl:when test=
"substring-before($BUILDS, ' ') = ''">
87 <xsl:value-of select=
"$BUILDS" />
90 <xsl:value-of select=
"substring-before($BUILDS, ' ')" />
94 <xsl:variable name=
"REMAINING" select=
"substring-after($BUILDS, ' ')" />
97 <a href=
"build-{$FIRST}/index.html">Build
<xsl:value-of select=
"$FIRST" /></a>
99 <xsl:if test=
"$REMAINING != ''" >
100 <xsl:call-template name=
"MAKE_LINKS_TO_PREVIOUS_BUILDS">
101 <xsl:with-param name=
"BUILDS" select=
"$REMAINING" />