Test in VM OCR improvements
[ci.git] / hbuild / web / index.xsl
blobfc3e887244b60f9ff10491bee14977891a795c8d
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 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>
45 </xsl:variable>
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>
53 </xsl:with-param>
54 <xsl:with-param name="EXTRA_HEAD">
55 </xsl:with-param>
56 <xsl:with-param name="BODY">
57 <div id="centeredd">
59 <h1 id="top-of-page">HelenOS continuous integration testing</h1>
60 <div id="summary">
61 <h2>Last build</h2>
62 <p class="action buttonset">
63 <a href="build-{$LAST_BUILD}/index.html">See details of this build.</a>
64 </p>
65 <xsl:apply-templates select="." mode="html-summary-table" />
66 </div>
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)" />
73 </xsl:call-template>
74 </ul>
75 </xsl:if>
76 </div>
77 </xsl:with-param>
79 </xsl:call-template>
80 </xsl:template>
82 <xsl:template name="MAKE_LINKS_TO_PREVIOUS_BUILDS">
83 <xsl:param name="BUILDS" />
84 <xsl:variable name="FIRST">
85 <xsl:choose>
86 <xsl:when test="substring-before($BUILDS, ' ') = ''">
87 <xsl:value-of select="$BUILDS" />
88 </xsl:when>
89 <xsl:otherwise>
90 <xsl:value-of select="substring-before($BUILDS, ' ')" />
91 </xsl:otherwise>
92 </xsl:choose>
93 </xsl:variable>
94 <xsl:variable name="REMAINING" select="substring-after($BUILDS, ' ')" />
96 <li>
97 <a href="build-{$FIRST}/index.html">Build <xsl:value-of select="$FIRST" /></a>
98 </li>
99 <xsl:if test="$REMAINING != ''" >
100 <xsl:call-template name="MAKE_LINKS_TO_PREVIOUS_BUILDS">
101 <xsl:with-param name="BUILDS" select="$REMAINING" />
102 </xsl:call-template>
103 </xsl:if>
104 </xsl:template>
106 </xsl:stylesheet>