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3GK3WUYG3NOB27MLQ5GGIGKLAD6JQ4UATTT3AC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
6KIJX24R5RRDR2UQMUAWHF3N6V6DKKL5URYSLB7IT4J5C3RO4G2AC
3JBUMW3ECBQ5OARJEWPD7U5LIAIVGVMZUB7VG3ZLEWA3AV5EXDKQC
RP6WDKE2VGNWZU3XBJSESTJWVV5BKZZ5SXPKT5N6XZIJ6XRTNWZQC
X7YLJT7WSU26JC7ROFHPRTRYXSL75IGO43SM5G6RJL33SP7EC3QQC
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="line">
<line>
<xsl:if test="contains(text(), ' *** ') or
contains(text(), 'LaTeX Error') or
contains(text(), 'BUILD FAILED') or
starts-with(text(), 'FAIL:') or
contains(text(), 'FAILURE') or
contains(text(), '[ERROR]') or
contains(text(), ' error: ') or
true">
<xsl:attribute name="error"></xsl:attribute>
</xsl:if>
<xsl:apply-templates select="@*|node()"/>
</line>
</xsl:template>
</xsl:stylesheet>
<xsl:output method='xml' encoding="UTF-8" />
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="logfile">
<p>
<a href="javascript:" class="btn btn-info tree-expand-all"><i class="icon-plus icon-white"></i> Expand all</a>
<xsl:text> </xsl:text>
<a href="javascript:" class="btn btn-info tree-collapse-all"><i class="icon-minus icon-white"></i> Collapse all</a>
</p>
<ul class='tree'>
<xsl:for-each select='line|nest'>
<li>
<xsl:apply-templates select='.'/>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="nest">
<!-- The tree should be collapsed by default if all children are
unimportant or if the header is unimportant. -->
<!-- <xsl:variable name="collapsed"
select="count(.//line[not(@priority = 3)]) = 0 or ./head[@priority = 3]" /> -->
<xsl:variable name="collapsed" select="count(.//*[@error]) = 0"/>
<xsl:variable name="style"><xsl:if test="$collapsed">display: none;</xsl:if></xsl:variable>
<xsl:variable name="arg"><xsl:choose><xsl:when test="$collapsed">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:variable>
<xsl:if test="line|nest">
<a href="javascript:" class="tree-toggle"></a>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:apply-templates select='head'/>
<!-- Be careful to only generate <ul>s if there are <li>s, otherwise it’s malformed. -->
<xsl:if test="line|nest">
<ul class='subtree' style="{$style}">
<xsl:for-each select='line|nest'>
<li>
<xsl:apply-templates select='.'/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:template>
<xsl:template match="head|line">
<span class="code">
<xsl:if test="@error">
<xsl:attribute name="class">code errorLine</xsl:attribute>
</xsl:if>
<xsl:if test="@priority = 3">
<xsl:attribute name="class">code prio3</xsl:attribute>
</xsl:if>
<xsl:apply-templates/><br/>
</span>
</xsl:template>
<xsl:template match="storeref">
<em class='storeref'>
<span class='popup'><xsl:apply-templates/></span>
<span class='elided'>/...</span><xsl:apply-templates select='name'/><xsl:apply-templates select='path'/>
</em>
</xsl:template>
</xsl:stylesheet>
<xsl:if test="@warning">
<xsl:attribute name="class">code warningLine</xsl:attribute>
</xsl:if>
<xsl:variable name="lineno"><xsl:number count="head|line" level="any" /></xsl:variable>
<a class="lineno" href="#line-{$lineno}" id="line-{$lineno}"><xsl:value-of select="$lineno" /> </a>
# !!! quick hack
my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath")
. " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -"
. " | xsltproc " . $c->path_to("xsl/log2html.xsl") . " -";
<h2>Last 50 log lines of [% INCLUDE renderFullJobNameOfBuild %] build <a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a>[%IF step %] step [% step.stepnr %][% END %]</h2>
<p>Below are the last 50 log lines. The <a href="[% c.uri_for('/build' build.id 'log') %]">full log</a> is also available.</p>
em.storeref {
color: #500000;
position: relative;
width: 100%;
}
em.storeref:hover {
background-color: #eeeeee;
}
*.popup {
display: none;
background: #ffffcd;
border: solid #555555 1px;
position: absolute;
top: 0em;
left: 0em;
margin: 0;
padding: 0;
z-index: 100;
}
em.storeref:hover span.popup {
display: inline;
}
span.code {
white-space: pre-wrap;
font-family: monospace;
}
.errorLine {
color: #ff0000;
font-weight: bold;
}
a.lineno {
color: #909090;
float: right;
}
}
.prio3 {
font-style: italic;
.warningLine {
color: darkorange;
font-weight: bold;
}
width: 40em;