From: Ian Jackson Subject: [OSSTEST PATCH 05/13] Reporting: report_run_getinfo produces ColourAttr Date: Mon, 29 Jun 2015 18:14:41 +0100 Message-ID: <1435598089-21647-6-git-send-email-ian.jackson@eu.citrix.com> References: <1435598089-21647-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9cuK-0000EJ-Km for xen-devel@lists.xenproject.org; Mon, 29 Jun 2015 17:31:48 +0000 In-Reply-To: <1435598089-21647-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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 "$jr->{job}\n"; my $ri = report_run_getinfo({ %$jr, %$ir }); - print H "{Colour}\">$ri->{Summary}\n"; + print H "{ColourAttr}>$ri->{Summary}\n"; print H "\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 ""; my $started = $r->{Flight}{started}; @@ -236,7 +235,7 @@ END print H "$flt\n"; print H "".encode_entities($r->{Flight}{branch})."\n"; $url= "$c{ReportHtmlPubBaseUrl}/$flt/".encode_entities($j)."/"; - print H "". + print H "{ColourAttr}>". encode_entities($r->{Summary})."\n"; my $lastrev; my $hosts = join ", ", map { $_ // "-" } @{ $r->{Hosts} }; -- 1.7.10.4