]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Reporting: report_run_getinfo produces ColourAttr
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 29 Jun 2015 14:51:22 +0000 (15:51 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 30 Jun 2015 11:26:43 +0000 (12:26 +0100)
This includes the bgcolour attribute name and the quotes.  This will
make it possible for this function to sometimes not set a background
for the whole table cell in the future (which will be part of putting
multiple step results in each cell).

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Remove an unneeded space in ColourAttr

Osstest/Executive.pm
sg-report-host-history
sg-report-job-history

index 2389eb2973b414c5d3b3cbec8cb116a412643eef..a45ec59a61e7332f583679be0384318418df6f22 100644 (file)
@@ -205,7 +205,10 @@ sub report_run_getinfo ($) {
 
     my $single = sub {
        my ($summary, $colour) = @_;
-       return { Summary => $summary, Colour => $colour };
+       return {
+           Summary => $summary,
+           ColourAttr => "bgcolor=\"$colour\"",
+       };
     };
 
     if ($status eq 'pass') {
index 208da55e392c4e5a3171e7a0aab1e61659792009..dc150af41afa6724bc3e8ef91724e907d94e61d4 100755 (executable)
@@ -248,7 +248,7 @@ END
        print H "<td><a href=\"$url\">$jr->{job}</td>\n";
 
        my $ri = report_run_getinfo({ %$jr, %$ir });
-       print H "<td bgcolor=\"$ri->{Colour}\">$ri->{Summary}</td>\n";
+       print H "<td $ri->{ColourAttr}>$ri->{Summary}</td>\n";
 
        print H "</tr>\n\n";
        $alternate ^= 1;
index 3d02e3f601e39536df0b473d3fab7ebc59dc5ad8..3aec6a0b69027cfe4d8d3a300e95f8d4a7dd40d5 100755 (executable)
@@ -226,7 +226,6 @@ END
         my @last_revs;
         my @alt_revs= ('0')x $#rev_grid_cols;
         foreach my $r (@test_rows) {
-            my $colour= "bgcolor=\"$r->{Colour}\"";
             my $altcolour= report_altcolour($alternate);
             print H "<tr $altcolour>";
            my $started = $r->{Flight}{started};
@@ -238,7 +237,7 @@ END
             print H "<td><a href=\"$url\">$flt</a></td>\n";
             print H "<td>".encode_entities($r->{Flight}{branch})."</td>\n";
             $url= "$c{ReportHtmlPubBaseUrl}/$flt/".encode_entities($j)."/";
-            print H "<td $colour><a href=\"$url\">".
+            print H "<td $r->{ColourAttr}><a href=\"$url\">".
                 encode_entities($r->{Summary})."</a></td>\n";
             my $lastrev;
             my $hosts = join ", ", map { $_ // "-" } @{ $r->{Hosts} };