xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST] sg-report-flight: Add a succcess/failure column header.
Date: Thu, 2 Oct 2014 12:56:06 +0100	[thread overview]
Message-ID: <1412250966-14374-1-git-send-email-ian.campbell@citrix.com> (raw)

There are so many rows and columns that scrolling around trying to find the
column associated with a failure is getting pretty tricky. Finding all failing
columns is even harder. Add a clue near the top.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 sg-report-flight | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index 4760656..7c955da 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -367,8 +367,6 @@ END
     $? and die "tsort $?";
 
     foreach my $j (@$jobs) {
-        push @gridcol_job, $j->{job};
-
 	$statuscounts{$j->{status}}++;
 
 	my $jobtext= sprintf "%s:\n", $j->{job};
@@ -448,6 +446,7 @@ END
         }
 
 	push @jobtexts, [ split /\n/, $jobtext ];
+	push @gridcol_job, [ $j->{job},$foundfail ];
     }
 
     my $outcomes= join '/', sort keys %statuscounts;
@@ -899,7 +898,7 @@ sub htmlout ($) {
 
     my @cols= @{ $fi->{GridCols} };
 
-    htmloutjob($fi, $_) foreach @cols;
+    htmloutjob($fi, $_->[0]) foreach @cols;
 
     my $htmlout= "$htmldir/index.html";
     open H, "> $htmlout.new" or die "$htmlout.new $!";
@@ -913,7 +912,7 @@ END
     print H encode_entities($fi->{FlightInfo}{blessing});
     print H "</th>\n";
 
-    foreach my $col (@cols) {
+    foreach my $col (map { @{$_}[0] } @cols) {
         my $th= $col;
         $th =~ s/\-/ $&/g;
         print H "<th>";
@@ -923,6 +922,20 @@ END
         print H "</th>";
     }
     print H "\n";
+    print H "<tr><th>";
+    print H "Status";
+    print H "</th>\n";
+    foreach my $col (map { @{$_}[1] } @cols) {
+        my ($colour,$text) = $col ?
+            ("#ff8888","Failed") :
+            ("#008800", "Success");
+
+        print H "<th bgcolor=$colour>$text</th>";
+    }
+    print H "\n";
+    # Create a gutter row after the headers.
+    print H "<tr><td>&nbsp;</td></tr>\n";
+
     foreach my $rowix (0..$#{ $fi->{GridRows} }) {
         next unless $fi->{GridRows}[$rowix];
         my $rowdesc= encode_entities($fi->{GridRows}[$rowix]);
@@ -958,7 +971,7 @@ END
             $label->($ndeferred, 'right');
         };
 
-        foreach my $col (@cols) {
+        foreach my $col (map { @{$_}[0] } @cols) {
             my $ei= $fi->{GridGrid}{$col}[$rowix];
             if ($ei) {
                 $deferred_cells->(1);
-- 
2.1.0

             reply	other threads:[~2014-10-02 11:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 11:56 Ian Campbell [this message]
2014-10-02 17:06 ` [OSSTEST PATCH v2] sg-report-flight: Add a succcess/failure column header Ian Jackson
2014-10-03  8:38   ` Ian Campbell
2014-10-03 11:21     ` Ian Jackson
2014-10-03 12:42       ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412250966-14374-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).