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 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:#509050; }
37 .NA2 { color:#BBBBBB; }
38 .OK2day { color:#00AA00; font-weight: bold; }
39 .KO2day { color:#FF0000; font-weight: bold; }
40 .KF2day { color:#FF8000; font-weight: bold; }
41 .NA2day { color:#BBBBBB; font-weight: bold; }
43 .new { background-color:#FF5500; }
44 .day { background-color:#F0E25A; font-size: small; }
45 .week { background-color:#E0E0E0; font-size: small; }
46 .month { background-color:#C0C0C0; font-size: small; }
47 .old { background-color:#A0A0A0; font-size: small; }
48 .lnk { font-size: 12px; }
49 .lnk a { text-decoration: none; }
50 .note { text-align : right; font-style: italic; font-size: small; }
51 table.legend { margin:0px;
53 border-collapse:collapse;
57 table.summary { width : 100%;
60 border-collapse:collapse;
64 td.summary { border : solid 0px; font-size: medium; }
65 td { border : solid 1px; }
66 td.small { border : solid 1px; font-size: small; }
67 th { font-size: small; border: solid 1px; }
68 h2 { text-align : center; }
69 h3 { text-align : left; font-size: small; font-weight: normal; }
70 h4 { text-align : left; font-size: small; font-weight: bold; display: inline; }
71 h_err { text-align : left; font-size: small; font-weight: normal; display: inline; color: red; }
72 .legend { text-align : center; }
73 .def { font-family: Arial, Verdana, "Times New Roman", Times, serif;}
77 <xsl:if test="//JobsReport/infos/@JobsCommandStatus='running'">
78 <meta http-equiv="refresh" content="1"></meta>
81 <script language="JavaScript"><![CDATA[
84 var element = document.getElementById(id);
86 if ( element.style.display == "none" )
87 element.style.display = "block";
89 element.style.display = "none";
92 function collapseall() {
93 var x=document.getElementsByTagName("div");
94 for (i=0;i<x.length;i++)
96 if ( x[i].id != "matrix" )
97 x[i].style.display = "none";
111 <td class="summary" align="right" valign="bottom" width="300">
112 <xsl:for-each select="//JobsReport/infos">
113 <span class="note"><xsl:value-of select="@name" />: <xsl:value-of select="@value" /></span>
120 <table class="summary">
122 <tr bgcolor="#9acd32">
124 <xsl:for-each select="//JobsReport/applications/application">
125 <xsl:sort select="@name" />
126 <th><xsl:value-of select="@name" /></th>
130 <!-- for all hosts -->
131 <xsl:for-each select="//JobsReport/distributions/dist">
132 <xsl:sort select="@name" />
133 <xsl:variable name="curr_distname" select="@name" />
135 <td align="center"><xsl:value-of select="$curr_distname" /></td>
136 <!-- for all jobs -->
137 <xsl:for-each select="//JobsReport/applications/application">
138 <xsl:sort select="@name" />
139 <xsl:variable name="curr_appli" select="@name" />
140 <td align="center" class="small">
141 <!-- get the job for current host and current appli -->
142 <xsl:for-each select="//JobsReport/jobs/job">
143 <xsl:sort select="@name" />
144 <xsl:if test="application/.=$curr_appli and distribution/.=$curr_distname">
145 <a href="#"><xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
146 <xsl:value-of select="@name"/></a>  :
147 <xsl:value-of select="state/." />
148 <xsl:if test="not(remote_log_file_path/.='nothing')">
150 <xsl:attribute name="title">remote log</xsl:attribute>
151 <xsl:attribute name="href"><xsl:value-of select="remote_log_file_path/."/></xsl:attribute>
167 <xsl:when test="//JobsReport/infos/@JobsCommandStatus='running'">
168 Command status : running <img src="running.gif"></img>
172 Command status : <xsl:value-of select="//JobsReport/infos/@JobsCommandStatus/."/>
179 <!-- Loop over the jobs in order to find what job was called in the link "onclick". Display information about that job -->
180 <xsl:for-each select="//JobsReport/jobs/job">
181 <xsl:variable name="curr_job_name" select="@name" />
182 <div style="display:none"><xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
183 <!-- Display job name -->
184 <h4>Name : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/@name"/>
186 <!-- Display the job attributes -->
187 <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"/>
189 <h4>User : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/user"/>
191 <h4>Timeout : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/timeout"/>
193 <h4>Begin : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/begin"/>
195 <h4>End : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/end"/>
197 <h4>Commands : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/commands"/>
199 <h4>Out : </h4><PRE><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/out"/></PRE>
201 <h4>Err : </h4><h_err><PRE><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/err"/></PRE></h_err>