1 <?xml version="1.0" encoding="utf-8"?>
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5 <xsl:template match="/">
8 <title>Jobs <xsl:value-of select="//JobsReport/board/."/> report</title>
9 <style type="text/css">
10 <!-- styles for commands results -->
11 .OKday { background-color:#20FF20; }
12 .OKweek { background-color:#90EE90; font-size: 11px; }
13 .OKmonth { background-color:#90EE90; font-size: 10px; }
14 .OKold { background-color:#90EE90; font-size: 9px; }
16 .KOday { background-color:#F20000; }
17 .KOweek { background-color:#FFC0CB; font-size: 11px; }
18 .KOmonth { background-color:#FFC0CB; font-size: 10px; }
19 .KOold { background-color:#FFC0CB; font-size: 9px; }
21 .KFday { background-color:#FFA500; }
22 .KFweek { background-color:#FAC86D; font-size: 11px; }
23 .KFmonth { background-color:#FAC86D; font-size: 10px; }
24 .KFold { background-color:#FAC86D; font-size: 9px; }
26 .NAday { background-color:#BBBBBB; }
27 .NAweek { background-color:#BFBFBF; font-size: 11px; }
28 .NAmonth { background-color:#CACACA; font-size: 10px; }
29 .NAold { background-color:#CFCFCF; font-size: 9px; }
31 .label { font-weight: bold; }
33 <!-- styles for links in matrix -->
34 .OK2 { color:#00AA00; }
35 .KO2 { color:#FF0000; }
36 .KF2 { color:#FF8000; }
37 .NA2 { color:#BBBBBB; }
38 .TO2 { color:GoldenRod; }
39 .RUNNING2 { color:LightSeaGreen; font-weight: bold; }
40 .OK2day { color:#00AA00; font-weight: bold; }
41 .KO2day { color:#FF0000; font-weight: bold; }
42 .KF2day { color:#FF8000; font-weight: bold; }
43 .NA2day { color:#BBBBBB; font-weight: bold; }
44 .TO2day { color:GoldenRod; font-weight: bold; }
46 .new { background-color:#FF5500; }
47 .day { background-color:#F0E25A; font-size: small; }
48 .week { background-color:#E0E0E0; font-size: small; }
49 .month { background-color:#C0C0C0; font-size: small; }
50 .old { background-color:#A0A0A0; font-size: small; }
51 .lnk { font-size: 12px; }
52 .lnk a { text-decoration: none; }
53 .note { text-align : right; font-style: italic; font-size: small; }
54 table.legend { margin:0px;
56 border-collapse:collapse;
61 table.summary { width : 100%;
64 border-collapse:collapse;
68 td.summary { border : solid 0px; font-size: medium; }
69 td { border : solid 1px; }
70 td.small { border : solid 1px; font-size: small; }
71 th { font-size: small; border: solid 1px; }
72 h2 { text-align : center; }
73 h3 { text-align : left; font-size: small; font-weight: normal; }
74 h4 { text-align : left; font-size: small; font-weight: bold; display: inline; }
75 h_err { text-align : left; font-size: small; font-weight: normal; display: inline; color: red; }
76 .legend { text-align : center; }
77 .def { font-family: Arial, Verdana, "Times New Roman", Times, serif;}
81 <xsl:if test="//JobsReport/infos/@JobsCommandStatus='running'">
82 <meta http-equiv="refresh" content="10"></meta>
85 <script language="JavaScript"><![CDATA[
88 var element = document.getElementById(id);
90 if ( element.style.display == "none" )
91 element.style.display = "block";
93 element.style.display = "none";
96 function collapseall() {
97 var x=document.getElementsByTagName("div");
98 for (i=0;i<x.length;i++)
100 if ( x[i].id != "matrix" )
101 x[i].style.display = "none";
113 <h2>Compilation report <xsl:value-of select="//JobsReport/board/."/></h2>
115 <td class="summary" align="right" valign="bottom" width="300">
116 <span class="note"><xsl:value-of select="//JobsReport/infos/@name" />: <xsl:value-of select="//JobsReport/infos/@value" /></span>
122 <xsl:attribute name="onclick">javascript:Toggle('legend')</xsl:attribute>
123 <xsl:attribute name="title">legend</xsl:attribute>
130 <table class="summary">
132 <tr bgcolor="#9acd32">
134 <xsl:for-each select="//JobsReport/applications/application">
135 <!--<xsl:sort select="@name" />-->
136 <th><xsl:value-of select="@name" /></th>
140 <!-- for all hosts -->
141 <xsl:for-each select="//JobsReport/distributions/dist">
142 <xsl:sort select="@name" />
143 <xsl:variable name="curr_distname" select="@name" />
145 <td align="center"><xsl:value-of select="$curr_distname" /></td>
146 <!-- for all jobs -->
147 <xsl:for-each select="//JobsReport/applications/application">
148 <!--<xsl:sort select="@name" />-->
149 <xsl:variable name="curr_appli" select="@name" />
150 <td align="center" class="small">
151 <!-- get the job for current host and current appli -->
152 <xsl:for-each select="//JobsReport/jobs/job">
154 <xsl:sort select="@name" />
156 <xsl:if test="application/.=$curr_appli and distribution/.=$curr_distname and board/.=//JobsReport/board/.">
157 <!-- Change background color if it is an extra job (not defined in the input csv files) -->
158 <xsl:if test="extra_job/.='yes'">
159 <xsl:attribute name="bgcolor">FFCCCC</xsl:attribute>
161 <!-- Get job status and put a link -->
163 <xsl:when test="state/.='SSH connection KO' or state/.='Cancelled'">
165 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
166 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
167 <xsl:attribute name="class">KO2day</xsl:attribute>
168 <xsl:value-of select="@name"/>
171 <xsl:when test="contains(state/., 'Not launched')">
173 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
174 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
175 <xsl:attribute name="class">NA2day</xsl:attribute>
176 <xsl:value-of select="@name"/>
179 <xsl:when test="contains(state/., 'running')">
181 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
182 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
183 <xsl:attribute name="class">RUNNING2</xsl:attribute>
184 <xsl:value-of select="@name"/>
187 <xsl:when test="contains(state/., 'Finished')">
189 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
190 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
191 <xsl:attribute name="class">OK2day</xsl:attribute>
195 <xsl:when test="contains(state/., 'Timeout')">
197 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
198 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
199 <xsl:attribute name="class">TO2day</xsl:attribute>
200 <xsl:value-of select="@name"/>
203 <xsl:when test="state/.='Not today'">
205 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
206 <xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
207 <xsl:attribute name="class">NA2</xsl:attribute>
208 <xsl:value-of select="@name"/>
212 <!--<xsl:value-of select="state/." />-->
213 <xsl:if test="not(remote_log_file_path/.='nothing') and state/.!='Not today'">
216 <xsl:attribute name="title">remote log</xsl:attribute>
217 <xsl:attribute name="href"><xsl:value-of select="remote_log_file_path/."/></xsl:attribute>
218 <xsl:if test="res/.='0'">
219 <xsl:attribute name="class">OK2day</xsl:attribute>
221 <xsl:if test="res/.!='0'">
222 <xsl:attribute name="class">KO2day</xsl:attribute>
224 <xsl:value-of select="host/."/>
225 <xsl:if test="port/.!='22'">
226 / <xsl:value-of select="port/."/>
237 <!-- get the missing jobs -->
238 <xsl:for-each select="//JobsReport/missing_jobs/job">
239 <xsl:if test="@distribution=$curr_distname and @application=$curr_appli">
240 <xsl:attribute name="bgcolor">FFCCCC</xsl:attribute>
252 <xsl:when test="//JobsReport/infos/@JobsCommandStatus='running'">
253 Command status : running <img src="running.gif"></img>
257 Command status : <xsl:value-of select="//JobsReport/infos/@JobsCommandStatus/."/>
262 <span class="note">input file: <xsl:value-of select="//JobsReport/@input_file" /></span>
264 <!-- Loop over the jobs in order to find what job was called in the link "onclick". Display information about that job -->
265 <xsl:for-each select="//JobsReport/jobs/job">
266 <xsl:variable name="curr_job_name" select="@name" />
267 <div style="display:none"><xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
268 <!-- Display job name -->
269 <h4>Name : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/@name"/>
271 <xsl:if test="//JobsReport/jobs/job[@name=$curr_job_name]/state!='Not today'">
272 <!-- Display the job attributes -->
273 <h4>Hostname/port : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/host"/>/<xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/port"/>
275 <h4>User : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/user"/>
277 <h4>salomeTools path : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/sat_path"/>
281 <xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/after"/>')</xsl:attribute>
282 <xsl:attribute name="title">Click to get job information</xsl:attribute>
283 <xsl:attribute name="class">OK2</xsl:attribute>
284 <xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/after"/>
287 <h4>Timeout : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/timeout"/>
289 <h4>Begin : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/begin"/>
291 <h4>End : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/end"/>
293 <h4>Out : </h4><PRE><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/out"/></PRE>
295 <h4>Err : </h4><h_err><PRE><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/err"/></PRE></h_err>
297 <h4>Status : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/state"/>
299 <h4>Commands : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/commands"/>
304 <div style="display:none"><xsl:attribute name="id">legend</xsl:attribute>
306 <tr><td>job</td><td>result</td></tr>
307 <tr><td> <xsl:attribute name="class">OK2day</xsl:attribute>success today</td><td> <xsl:attribute name="class">OK2day</xsl:attribute>success today</td></tr>
308 <tr><td> <xsl:attribute name="class">OK2</xsl:attribute>success not today</td><td> <xsl:attribute name="class">OK2</xsl:attribute>success not today</td></tr>
309 <tr><td> <xsl:attribute name="class">KO2day</xsl:attribute>fail today</td><td> <xsl:attribute name="class">KO2day</xsl:attribute>fail today</td></tr>
310 <tr><td> <xsl:attribute name="class">KO2</xsl:attribute>fail not today</td><td> <xsl:attribute name="class">KO2</xsl:attribute>fail not today</td></tr>
311 <tr><td> <xsl:attribute name="class">TO2day</xsl:attribute>timeout today</td><td> <xsl:attribute name="class">KF2day</xsl:attribute>known failure today</td></tr>
312 <tr><td> <xsl:attribute name="class">RUNNING2</xsl:attribute>running</td><td> <xsl:attribute name="class">KF2</xsl:attribute>known failure not today</td></tr>
313 <tr><td> <xsl:attribute name="class">NA2day</xsl:attribute>To be launched</td></tr>
314 <tr><td> <xsl:attribute name="class">NA2</xsl:attribute>Not today</td></tr>
315 <tr>Missing job: <td> <xsl:attribute name="bgcolor">FFCCCC</xsl:attribute> </td></tr>
316 <tr>Extra job: <td> <xsl:attribute name="bgcolor">FFCCCC</xsl:attribute> Job name </td></tr>