]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
jobs report, display error when jobs are missing somewhere in the week
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Thu, 20 Oct 2016 09:57:37 +0000 (11:57 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Thu, 20 Oct 2016 09:57:37 +0000 (11:57 +0200)
commands/jobs.py
src/xsl/jobs_board_report.xsl

index 601a049f98f67b7535d82f2ffa9a1eb3cda1a19c..371c5e6b3a98df98b6cea04dc64bdd92ccae172d 100644 (file)
@@ -1213,6 +1213,7 @@ class Gui(object):
         # input csv files but that are not covered by a today job
         for board in self.d_input_boards.keys():
             xml_root_board = self.d_xml_board_files[board].xmlroot
+            # Find the missing jobs for today
             xml_missing = src.xmlManager.add_simple_node(xml_root_board,
                                                  "missing_jobs")
             for row, column in self.d_input_boards[board]["jobs"]:
@@ -1227,6 +1228,22 @@ class Gui(object):
                                             "job",
                                             attrib={"distribution" : row,
                                                     "application" : column })
+            # Find the missing jobs not today
+            xml_missing_not_today = src.xmlManager.add_simple_node(
+                                                 xml_root_board,
+                                                 "missing_jobs_not_today")
+            for row, column in self.d_input_boards[board]["jobs_not_today"]:
+                found = False
+                for job in l_jobs_not_today:
+                    if (job.application == column and 
+                        job.machine.distribution == row):
+                        found = True
+                        break
+                if not found:
+                    src.xmlManager.add_simple_node(xml_missing_not_today,
+                                            "job",
+                                            attrib={"distribution" : row,
+                                                    "application" : column })
 
     def find_history(self, l_jobs, l_jobs_not_today):
         """find, for each job, in the existent xml boards the results for the 
@@ -1329,6 +1346,7 @@ class Gui(object):
             
             rows = []
             jobs = []
+            jobs_not_today = []
             for line in input_board[1:]:
                 row = line[0]
                 rows.append(row)
@@ -1337,13 +1355,16 @@ class Gui(object):
                         continue
                     days = square.split(DAYS_SEPARATOR)
                     days = [int(day) for day in days]
+                    job = (row, columns[i])
                     if today in days:                           
-                        job = (row, columns[i])
                         jobs.append(job)
+                    else:
+                        jobs_not_today.append(job)
 
             d_boards[board_name] = {"rows" : rows,
                                     "columns" : columns,
-                                    "jobs" : jobs}
+                                    "jobs" : jobs,
+                                    "jobs_not_today" : jobs_not_today}
         
         self.d_input_boards = d_boards
 
index e33abe42f2ddc03a0023219001a4e042211eeba3..326eddd5a8e5e53aa9ff5b27151607c22a4d175a 100644 (file)
                        <xsl:attribute name="bgcolor">FFCCCC</xsl:attribute>
                    </xsl:if>
              </xsl:for-each>
+             <!-- get the missing jobs not today -->
+             <xsl:for-each select="//JobsReport/missing_jobs_not_today/job">    
+                   <xsl:if test="@distribution=$curr_distname and @application=$curr_appli">
+                       <xsl:attribute name="bgcolor">FFEFEF</xsl:attribute>
+                   </xsl:if>
+             </xsl:for-each>
              
          </td>
        </xsl:for-each>
                  <br/>
                  <h4>User : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/user"/>
                  <br/>
-                 <!-- Display history -->
-                 <h4>History : </h4>
-                 <br/>
-                 <xsl:for-each select="//JobsReport/jobs/job[@name=$curr_job_name]/history/link">
-                   <xsl:sort select="@date" order="descending" />
-                   <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>
-                   <br/>
-                 </xsl:for-each>
+          </xsl:if>
+         <!-- Display history -->
+         <h4>History : </h4>
+         <br/>
+         <xsl:for-each select="//JobsReport/jobs/job[@name=$curr_job_name]/history/link">
+           <xsl:sort select="@date" order="descending" />
+           <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>
+           <br/>
+         </xsl:for-each>
+         <xsl:if test="//JobsReport/jobs/job[@name=$curr_job_name]/state!='Not today'">
                  <h4>salomeTools path : </h4><xsl:value-of select="//JobsReport/jobs/job[@name=$curr_job_name]/sat_path"/>
                  <br/>
                  <h4>After : </h4>