[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 05/13] 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> --- 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..f53d271 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 f4e73e9..9e3edf7 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -242,7 +242,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 900d998..aa33f94 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -224,7 +224,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}; @@ -236,7 +235,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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |