@@ -246,6 +246,27 @@ END
push @rows, { %$jr, %$endedrow };
}
+ my $write_cache_entry = sub {
+ my ($jr) = @_;
+ print H "<!-- osstest-report-reuseable";
+ my $whash = sub {
+ my ($h) = @_;
+ foreach my $k (sort keys %$h) {
+ next if $k =~ m/^\%/;
+ $_ = $h->{$k};
+ s{[^-+=/~:;_.,\w]}{ sprintf "%%%02x", ord $& }ge;
+ printf H " %s=%s", $k, $_;
+ }
+ };
+ $whash->($jr);
+ foreach my $hk (sort keys %$jr) {
+ next unless $hk =~ m/^\%/;
+ print H " $'";
+ $whash->($jr->{$hk});
+ }
+ print H " -->\n";
+ };
+
@rows = sort { $b->{finished} <=> $a->{finished} } @rows;
$#rows = $limit-1 if @rows > $limit;
@@ -338,6 +359,8 @@ END
print H "<td>" if !$any_power;
print H "</td>\n";
+ $write_cache_entry->($jr);
+
print H "</tr>\n\n";
$alternate ^= 1;
}
Write the %$jr contents out in a fairly terse format. We stuff it into a parseable SGML/XML comment in the output HTML. Nothing makes use of this yet - parsing it back in will come later. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- sg-report-host-history | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)