res_job = job_node.find("res").text
if link != "nothing":
l_links.append((date, res_job, link))
-
+ l_links = sorted(l_links, reverse=True)
self.history[job.name] = l_links
def put_jobs_not_today(self, l_jobs_not_today, xml_node_jobs):
src.xmlManager.add_simple_node(xmlj, "sat_path",
job.machine.sat_path)
xml_history = src.xmlManager.add_simple_node(xmlj, "history")
- for date, res_job, link in self.history[job.name]:
- src.xmlManager.add_simple_node(xml_history,
- "link",
- text=link,
- attrib={"date" : date,
- "res" : res_job})
+ for i, (date, res_job, link) in enumerate(self.history[job.name]):
+ if i==0:
+ # tag the first one (the last one)
+ src.xmlManager.add_simple_node(xml_history,
+ "link",
+ text=link,
+ attrib={"date" : date,
+ "res" : res_job,
+ "last" : "yes"})
+ else:
+ src.xmlManager.add_simple_node(xml_history,
+ "link",
+ text=link,
+ attrib={"date" : date,
+ "res" : res_job,
+ "last" : "no"})
def parse_csv_boards(self, today):
""" Parse the csv file that describes the boards to produce and fill
<xsl:for-each select="//JobsReport/jobs/job">
<xsl:sort select="@name" />
-
+ <xsl:variable name="curr_job_name" select="@name" />
<xsl:if test="application/.=$curr_appli and distribution/.=$curr_distname and board/.=//JobsReport/board/.">
<!-- Change background color if it is an extra job (not defined in the input csv files) -->
<xsl:if test="extra_job/.='yes'">
<xsl:attribute name="onclick">javascript:Toggle('<xsl:value-of select="@name"/>')</xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="state/."/></xsl:attribute>
<xsl:attribute name="class">NA2</xsl:attribute>
- <xsl:value-of select="@name"/>
+ job
</a>
</xsl:when>
</xsl:choose>
/ <xsl:value-of select="port/."/>
</xsl:if>
</a>
+ </xsl:if>
+ <xsl:if test="state/.='Not today'">
+ -
+ <xsl:for-each select="//JobsReport/jobs/job[@name=$curr_job_name]/history/link">
+ <xsl:sort select="@date" order="descending" />
+ <xsl:if test="@last='yes'">
+ <h4>
+ <a>
+ <xsl:attribute name="title">remote log</xsl:attribute>
+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
+ <xsl:if test="@res='0'">
+ <xsl:attribute name="class">OK2</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@res!='0'">
+ <xsl:attribute name="class">KO2</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="@date"/>
+ </a>
+ </h4>
+ </xsl:if>
+ </xsl:for-each>
</xsl:if>
<br/>