]> TLD Linux GIT Repositories - TLD.git/blob - pld-builder.new/xml/queue.xslt
82d1dc63d80136959b0bd7c9d1a1a67363321895
[TLD.git] / pld-builder.new / xml / queue.xslt
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <!-- TODO:  1) links
5                         2) proper dates with http://www.djkaty.com/drupal/xsl-date-time -->
6
7 <xsl:template match="/queue">
8 <html><head><title>PLD builder queue</title></head><body>
9 <xsl:for-each select="group">
10         <xsl:sort select="@no" order="descending"/>
11         <p><b><xsl:value-of select="@no"/></b>. <xsl:value-of select="time"/> from <xsl:value-of select="requester"/><xsl:text> </xsl:text><small><xsl:value-of select="@id"/>, <xsl:value-of select="priority"/>, <xsl:value-of select="@flags"/></small><br/>
12         <ul>
13         <xsl:for-each select="batch">
14         <li>
15                 <xsl:value-of select="src-rpm"/> 
16                 (<xsl:value-of select="spec"/> -R <xsl:value-of select="branch"/> 
17                 <xsl:for-each select="with | without">
18                         <xsl:if test="name() = 'with'">
19                                 <xsl:text> --with </xsl:text>
20                         </xsl:if>
21                         <xsl:if test="name() = 'without'">
22                                 <xsl:text> --without </xsl:text>
23                         </xsl:if>
24                         <xsl:value-of select="."/>
25                         <xsl:if test="position() != last()">
26                                 <xsl:text> </xsl:text>
27                         </xsl:if>
28                 </xsl:for-each>
29                 <xsl:if test="kernel">
30                         <xsl:text> --define 'alt_kernel </xsl:text>
31                         <xsl:value-of select="kernel"/>'
32                 </xsl:if>)
33                 <small>
34                         [<xsl:for-each select="builder"><b>
35                                 <xsl:choose>
36                                         <xsl:when test="@status = 'OK'">
37                                                 <font color='green'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
38                                         </xsl:when>
39                                         <xsl:when test="@status = 'FAIL'">
40                                                 <font color='red'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
41                                         </xsl:when>
42                                         <xsl:otherwise>
43                                                 <font color='black'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
44                                         </xsl:otherwise>
45                                 </xsl:choose>
46                         </b>
47                                 <xsl:if test="position()!=last()"><xsl:text> </xsl:text></xsl:if>
48                                 </xsl:for-each>]
49                 </small>
50         </li>
51         </xsl:for-each>
52         </ul>
53 </p>
54 </xsl:for-each>
55 </body></html>
56 </xsl:template>
57
58 </xsl:stylesheet>
59