From: Serge Rehbinder Date: Fri, 21 Oct 2016 08:49:57 +0000 (+0200) Subject: Add a link to the last job result in the the jobs board if the job is not today X-Git-Tag: 5.0.0a1~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=96d2d2dc1c9cfb898bf20aabfc2a7ba616d1e7e0;p=tools%2Fsat.git Add a link to the last job result in the the jobs board if the job is not today --- diff --git a/commands/jobs.py b/commands/jobs.py index 371c5e6..a62f68e 100644 --- a/commands/jobs.py +++ b/commands/jobs.py @@ -1281,7 +1281,7 @@ class Gui(object): 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): @@ -1310,12 +1310,22 @@ class Gui(object): 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 diff --git a/src/xsl/jobs_board_report.xsl b/src/xsl/jobs_board_report.xsl index 326eddd..8f13c18 100644 --- a/src/xsl/jobs_board_report.xsl +++ b/src/xsl/jobs_board_report.xsl @@ -158,7 +158,7 @@ - + @@ -211,7 +211,7 @@ javascript:Toggle('') NA2 - + job @@ -232,6 +232,27 @@ / + + + - + + + +

+ + remote log + + + OK2 + + + KO2 + + + +

+
+