[tools 2/2] testbot/web: Colorize and link the JobDetails page's failure counts.

Francois Gouget fgouget at codeweavers.com
Tue May 3 12:40:12 CDT 2022


When there are a lot of tasks this makes it easier to identify and go
to those that have failures.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
This also makes the presentation more consistent with the main index 
page.
---
 testbot/web/JobDetails.pl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index b0ef2a733..99c68bcb8 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -132,6 +132,13 @@ sub GenerateDataView($$$)
     GenerateTipDateTime($StepTask->Ended, DurationToString($Duration));
     return;
   }
+  if ($PropertyName eq "TestFailures" and defined $StepTask->TestFailures)
+  {
+    my $class = $StepTask->TestFailures ? "testfail" : "success";
+    print "<a href='#k", $StepTask->GetKey(), "'><span class='$class'>",
+          $StepTask->TestFailures, "</span></a>";
+    return;
+  }
   $self->SUPER::GenerateDataView($Row, $Col);
 }
 
-- 
2.30.2



More information about the wine-devel mailing list