[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 09/14] Reporting: report_run_getinfo produces ColourAttr



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@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
v2: Remove an unneeded space in ColourAttr
---
 Osstest/Executive.pm   |    5 ++++-
 sg-report-host-history |    2 +-
 sg-report-job-history  |    3 +--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index 2389eb2..a45ec59 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -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') {
diff --git a/sg-report-host-history b/sg-report-host-history
index 208da55..dc150af 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -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;
diff --git a/sg-report-job-history b/sg-report-job-history
index 3d02e3f..3aec6a0 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -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} };
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.